serializer.exclude("*.class");的效果 余 serializer.exclude("class");的效果是一样的
运行效果
[{"id":"1","name":"数码相机","price":2000.0},{"id":"2","name":"笔记本电脑","price":3000.0},{"id":"3","name":"空调","price":1999.0},{"id":"4","name":"洗衣机","price":1000.0}]
没加serializer.exclude("*.class");的效果
[{"class":"cn.itcast.action.Product","id":"1","name":"数码相机","price":2000.0},{"class":"cn.itcast.action.Product","id":"2","name":"笔记本电脑","price":3000.0},{"class":"cn.itcast.action.Product","id":"3","name":"空调","price":1999.0},{"class":"cn.itcast.action.Product","id":"4","name":"洗衣机","price":1000.0}]