Could not write content: 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.back.web.domain.ResponseData[\"result\"]->java.util.ArrayList[0]->com.back.web.domain.MaterialDispatch_$$_jvst422_0[\"handler\"]); nested exception is com.fasterxml.jackson.databind.JsonMappingException: 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.back.web.domain.ResponseData[\"result\"]->java.util.ArrayList[0]->com.back.web.domain.MaterialDispatch_$$_jvst422_0[\"handler\"])",
解决方法
解决办法是在所有关联类上加 @JsonIgnoreProperties(value = { "handler" })
作用是在 json 序列化时忽略 bean 中的一些不需要转化的属性