1、com.fasterxml.jackson.databind.exc.InvalidDefinitionException: No serializer found for class org.hibernate.proxy.pojo.bytebuddy.ByteBuddyInterceptor and no properties discovered to create BeanSerializer
原因:數(shù)據(jù)中存在null值導(dǎo)致無法正常序列化
解決:在實(shí)體類中添加@JsonIgnoreProperties(value = {"hibernateLazyInitializer", "handler"})
2、java.lang.IllegalStateException: No primary or single public constructor found for interface java.util.List - and no default constructor found either
原因:controller層無法自動(dòng)接收List參數(shù)
解決:需要通過vo對象進(jìn)行參數(shù)接收