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. php - mysql 模糊搜索問題2. html - 爬蟲時出現“DNS lookup failed”,打開網頁卻沒問題,這是什么情況?3. javascript - 在 vue里面用import引入js文件,結果為undefined4. php工具箱配置第二個vhost主機時不生效,報錯You don’t have permission5. php - 微信開發驗證服務器有效性6. 求救一下,用新版的phpstudy,數據庫過段時間會消失是什么情況?7. [python2]local variable referenced before assignment問題8. javascript - js setTimeout在雙重for循環中如何使用?9. javascript - 我的站點貌似被別人克隆了, google 搜索特定文章,除了域名不一樣,其他的都一樣,如何解決?10. javascript - 求幫助 , ATOM不顯示界面!!!!
