java - Spring boot 配置spring.jackson.serialization-inclusion无效
问题描述
在学习spring boot时配置Jackson遇到一个配置spring.jackson.serialization-inclusion无效,配置在一起的date-format是有效的,查了一大圈资料,感觉应该可以才对!
github上的问题链接:https://github.com/spring-pro...
参照github上配的,spring boot是 1.5.1版本,不知道为什么不起作用,项目中的配置:
#Jackson配置spring.jackson: serialization-inclusion: non_null date-format: yyyy/MM/dd HH:mm:ss
界面的输出:
{ 'color': '#1e90ff', 'color0': null, 'type': 'dashed', 'width': 2, 'shadowColor': null, 'shadowBlur': null, 'shadowOffsetX': null, 'shadowOffsetY': null, 'normal': null, 'emphasis': null}##这是另一个例子{'id':1,'email':null,'name':'jack','birth':'2017/02/28 14:43:00'}
问题解答
回答1:配置 spring.jackson.default-property-inclusion
相关文章:
1. mysql - 仅仅只是把单引号与反斜杠转义不用prepare statement能否避免sql注入?2. 分页显示 - MySQL分页查询,是用LIMIT m,n,还是先查出所有ID再在前端分页?3. mysql-配置 - MySQL错误,时不时自动挂掉,无法启动4. mysql优化 - mysql 5.7 not in != 索引有效,是为什么啊?更新了吗?5. tp6 事务闭包操作问题6. 请教各位高手,关于 PHP取值问题7. PHP类属性声明?8. extra没有加载出来9. phpstudy 发现多个后门木马,有人遇到过吗?10. thinkphp框架放根目录无法像老师一样可以正常访问

网公网安备