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. boot2docker無(wú)法啟動(dòng)2. 關(guān)docker hub上有些鏡像的tag被標(biāo)記““This image has vulnerabilities””3. docker-compose中volumes的問(wèn)題4. javascript - mock.js可以存儲(chǔ)數(shù)據(jù)嗎5. nignx - docker內(nèi)nginx 80端口被占用6. java - SSH框架中寫(xiě)分頁(yè)時(shí)service層中不能注入分頁(yè)類(lèi)7. docker安裝后出現(xiàn)Cannot connect to the Docker daemon.8. dockerfile - 為什么docker容器啟動(dòng)不了?9. golang - 用IDE看docker源碼時(shí)的小問(wèn)題10. docker api 開(kāi)發(fā)的端口怎么獲取?

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