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. javascript - 父级设置了相对定位。子元素设置了绝对定位。子元素中包含了浮动的table,这个时候高度不能自适应。2. docker容器呢SSH为什么连不通呢?3. javascript - js的string数据类型,这段表述是什么意思?4. dockerfile - 为什么docker容器启动不了?5. golang - 用IDE看docker源码时的小问题6. docker images显示的镜像过多,狗眼被亮瞎了,怎么办?7. docker api 开发的端口怎么获取?8. Span标签9. docker start -a dockername 老是卡住,什么情况?10. debian - docker依赖的aufs-tools源码哪里可以找到啊?
