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
Logo

旨在为数千万中国开发者提供一个无缝且高效的云端环境,以支持学习、使用和贡献开源项目。

更多推荐