How can I change Jacksons Configuration when using Spring Data REST?

前端 未结 4 1058
予麋鹿
予麋鹿 2021-01-16 09:37

I\'m trying to configure Jackson to show JSR 310 instants in ISO 8601 format.

@Configuration
class Jackson {

    @Bean
    static ObjectMapper objectMapper(         


        
4条回答
  •  独厮守ぢ
    2021-01-16 10:18

    Actually, you could make it more bootify just using jackson auto-configuration properties in application.properties (or application.yml):

    spring.jackson.serialization.write_dates_as_timestamps=false
    

提交回复
热议问题