java - Spring boot 配置spring.jackson.serialization-inclusion無(wú)效
問(wèn)題描述
在學(xué)習(xí)spring boot時(shí)配置Jackson遇到一個(gè)配置spring.jackson.serialization-inclusion無(wú)效,配置在一起的date-format是有效的,查了一大圈資料,感覺(jué)應(yīng)該可以才對(duì)!
github上的問(wèn)題鏈接:https://github.com/spring-pro...
參照github上配的,spring boot是 1.5.1版本,不知道為什么不起作用,項(xiàng)目中的配置:
#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}##這是另一個(gè)例子{'id':1,'email':null,'name':'jack','birth':'2017/02/28 14:43:00'}
問(wèn)題解答
回答1:配置 spring.jackson.default-property-inclusion
相關(guān)文章:
1. javascript - immutable配合react提升性能?2. javascript - sublime快鍵鍵問(wèn)題3. javascript - nodejs關(guān)于進(jìn)程間發(fā)送句柄的一點(diǎn)疑問(wèn)4. Apache 已經(jīng)把網(wǎng)站根目錄的改為allow from all了,但是服務(wù)器還是不能訪問(wèn)?5. 實(shí)現(xiàn)bing搜索工具urlAPI提交6. javascript - 移動(dòng)端上不能實(shí)現(xiàn)拖拽布局嗎?7. vue.js - Vue 如何像Angular.js watch 一樣監(jiān)聽(tīng)數(shù)據(jù)變化8. phpstudy8.1支持win11系統(tǒng)嗎?9. 配置Apache時(shí),添加對(duì)PHP的支持時(shí)語(yǔ)法錯(cuò)誤10. css - 寫頁(yè)面遇到個(gè)布局問(wèn)題,求大佬們幫解答,在線等,急!~

網(wǎng)公網(wǎng)安備