Type definition error: [simple type, class org.apache.ibatis.executor.loader.javassist.JavassistProxyFactory$EnhancedResultObjectProxyImpl]; nested exception is com.fasterxml.jackson.databind.exc.InvalidDefinitionException: No serializer found for class org.apache.ibatis.executor.loader.javassist.JavassistProxyFactory$EnhancedResultObjectProxyImpl and no properties discovered to create BeanSerializer (to avoid exception, disable SerializationFeature.FAIL_ON_EMPTY_BEANS) (through reference chain: com.jeeplus.common.json.AjaxJson["traininGoalDetails"]->com.jeeplus.core.persistence.Page["list"]->java.util.ArrayList[0]->com.jeeplus.modules.graduation.requirements.entity.GraduationRequirements_$$_jvst35c_1["handler"])2021-03-15 10:57:18.621 DEBUG 7676 --- [SchedulerThread] c.j.d.d.DynamicRoutingDataSource
解决办法
解决办法是在所有关联类上加 @JsonIgnoreProperties(value = { “handler” })
作用是在 json 序列化时忽略 bean 中的一些不需要转化的属性