com.fasterxml.jackson.databind.exc.InvalidDefinitionException: No serializer found for class org.hibernate.proxy.pojo.bytebuddy.ByteBuddyInterceptor and no properties discovered to create BeanSerializer (to avoid exception, disable SerializationFeature.FAIL_ON_EMPTY_BEANS) (through reference chain: top.harmonytqs.entity.Demo$HibernateProxy$wprVXf6u["hibernateLazyInitializer"])
//忽略序列化:在 json 序列化时忽略bean中的一些不需要转化的属性
@JsonIgnoreProperties({"hibernateLazyInitializer", "handler"})
原文:https://www.cnblogs.com/200ok/p/15219898.html