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. angular.js - 请教angularjs里html和js通信的问题2. angular.js - angularjs的问题:点击”选择图片“后,需要很长的时间才能选择图片3. angular.js - 用angular2-cli打包项目之后,跳转路由刷新会报404的错误4. angular.js - angular-ueditor使用中,插入图片,加载完成后不更新angularmodel的问题;5. node.js - 怎么在初始化的时候使得一个子组件不加载?6. angular.js - 有没有不需要先git clone xxxx的angular2的教程?7. angular.js - angular2 基础问题,求解答8. angular.js - ng-model如何绑定二选一的单选项框?9. angular.js - angularjs 如何用一组按钮完成单选10. javascript - jquery中的$.post()为什么不能跨域提交数据呢?