其他分享
首页 > 其他分享> > 在使用Dozer将List转为List时,出现错误Resolved [org.springframework.http.converter.HttpMessageConversionE

在使用Dozer将List转为List时,出现错误Resolved [org.springframework.http.converter.HttpMessageConversionE

作者:互联网

Resolved [org.springframework.http.converter.HttpMessageConversionException: Type definition error: [simple type, class com.lz.game.system.entity.vo.TagVo]; nested exception is com.fasterxml.jackson.databind.exc.InvalidDefinitionException: No serializer found for class com.lz.game.system.entity.vo.TagVo and no properties discovered to create BeanSerializer (to avoid exception, disable SerializationFeature.FAIL_ON_EMPTY_BEANS) (through reference chain: com.lz.game.common.api.R[“data”]->java.util.HashMap[“records”]->java.util.ArrayList[0])]

网上查找发现原来是缺少getter和setter方法,加了个@Data注解就行了。记在这,以防下次遇到。

lz无痕 发布了15 篇原创文章 · 获赞 16 · 访问量 9460 私信 关注

标签:Resolved,Dozer,com,List,springframework,entity,util,game,lz
来源: https://blog.csdn.net/weixin_39520967/article/details/103993130