JPA 查询列表报错:com.fasterxml.jackson.databind.JsonMappingException

com.fasterxml.jackson.databind.JsonMappingException: No serializer found for class org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer and no properties discovered to create BeanSerializer (to avoid exception, disable SerializationFeature.FAIL_ON_

解决办法:

fetch = FetchType.LAZY改为fetch = FetchType.EAGER

猜你喜欢

转载自blog.csdn.net/daqiang012/article/details/80176217