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. docker鏡像push報錯2. 關docker hub上有些鏡像的tag被標記““This image has vulnerabilities””3. html5 - datatables 加載不出來數據。4. Docker for Mac 創建的dnsmasq容器連不上/不工作的問題5. node.js - mongodb查找子對象的名稱為某個值的對象的方法6. docker 下面創建的IMAGE 他們的 ID 一樣?這個是怎么回事????7. 運行python程序時出現“應用程序發生異常”的內存錯誤?8. html5和Flash對抗是什么情況?9. 測試自動化html元素選擇器元素ID或DataAttribute [關閉]10. 前端 - @media query 使用出現的問題?

網公網安備