错误信息如下:
Caused by: com.fasterxml.jackson.databind.exc.InvalidDefinitionException: No serializer found for class org.apache.ibatis.executor.loader.javassist.JavassistProxy
Factory$EnhancedResultObjectProxyImpl and no properties discovered to create BeanSerializer (to avoid exception, disable SerializationFeature.FAIL_ON_EMPTY_BEANS)
(through reference chain: java.util.HashMap["data"]->java.util.ArrayList[0]->com.wzh.app.users.PersonVo_$$_jvstc02_0["handler"])
at com.fasterxml.jackson.databind.exc.InvalidDefinitionException.from(InvalidDefinitionException.java:77)
at com.fasterxml.jackson.databind.SerializerProvider.reportBadDefinition(SerializerProvider.java:1277)
注意这一行:com.wzh.app.users.PersonVo_$$_jvstc02_0["handler"])
在PersonVo类上面增加以下配置:
@JsonIgnoreProperties(value = { "handler"})
public class PersonVo {...}
问题解决。