no properties discovered to create BeanSerializer 问题解决
SpringBoot整合DBHelper的时候出现如下的报错:no properties discovered to create BeanSerializer (to avoid exception, disable SerializationFeature.FAIL_ON_EMPTY_BEANS) (through reference chain: com.github.pagehelpe..
文章共132字 · 阅读需要大约1分钟
一键AI生成摘要,助你高效阅读
问答
·
SpringBoot整合DBHelper的时候出现如下的报错:
no properties discovered to create BeanSerializer (to avoid exception, disable SerializationFeature.FAIL_ON_EMPTY_BEANS) (through reference chain: com.github.pagehelper.PageInfo["list"]->com.github.pagehelper.Page[0])
当时看到是序列化报错,马上检查了自己所有的bean,都implements Serializable了
然后去查了一下SpringBoot对Json格式的解析,果真Springboot中有一套对Json格式输出的严格控制--JackSon
问题解决的办法其实就是差了一句properties配置:<将jackSon关闭即可>
spring.jackson.serialization.FAIL_ON_EMPTY_BEANS=false
更多推荐
已为社区贡献2条内容
所有评论(0)