java - Spring boot 配置spring.jackson.serialization-inclusion無效
問題描述
在學(xué)習(xí)spring boot時配置Jackson遇到一個配置spring.jackson.serialization-inclusion無效,配置在一起的date-format是有效的,查了一大圈資料,感覺應(yīng)該可以才對!
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
相關(guān)文章:
1. android - weex 項目createInstanceReferenceError: Vue is not defined2. android - 哪位大神知道java后臺的api接口的對象傳到前端后輸入日期報錯,是什么情況?求大神指點3. PHPExcel表格導(dǎo)入數(shù)據(jù)庫怎么導(dǎo)入4. pdo 寫入到數(shù)據(jù)庫的內(nèi)容為中文的時候?qū)懭雭y碼5. javascript - 如圖,百度首頁,查看源代碼為什么什么都沒有?6. vue2.0+webpack 如何使用bootstrap?7. PHP類封裝的插入數(shù)據(jù),總是插入不成功,返回false;8. mac連接阿里云docker集群,已經(jīng)卡了2天了,求問?9. 微信渠道二維碼怎么使用?10. html5 - html元素select下拉列表在原生app里面為什么不能彈框顯示?
