No serializer found for class org.apache.ibatis.executor.loader.javassist.JavassistProxyFactory$

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\"])",java

解決方法web

解決辦法是在全部關聯類上加 @JsonIgnoreProperties(value = { "handler" })apache

做用是在 json 序列化時忽略 bean 中的一些不須要轉化的屬性json

相關文章
相關標籤/搜索