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. html5 - 這個代碼顯示功能如何實現?2. Docker for Mac 創(chuàng)建的dnsmasq容器連不上/不工作的問題3. java - 關于File的問題?4. java - instance method中 static后的<K>是什么意思?5. docker - 如何修改運行中容器的配置6. 錯誤:java.lang.NoSuchMethodError:org.objectweb.asm.ClassWriter。<init>(I)V7. python3.x - python連oanda的模擬交易api獲取json問題第五問8. javascript - QWebEngineView 如何爬 angular 的動態(tài)數據?9. docker-machine添加一個已有的docker主機問題10. 為什么我ping不通我的docker容器呢???
