How to configure jackson with spring globally?

前端 未结 4 437
走了就别回头了
走了就别回头了 2021-01-20 12:47

To serialize deserialize object I am useing Jackson as flow

@JsonSerialize(using = LocalDateSerializer.class)
@JsonDeserialize(using = LocalDateDeserializer.         


        
4条回答
  •  谎友^
    谎友^ (楼主)
    2021-01-20 13:30

    You can use configure your serializers (providing fully qualified class name) in spring Jackson2ObjectMapperFactoryBean then bind it with MappingJackson2HttpMessageConverter. Here is an example XML configuration snippet:

    
       
         
           
             
               
             
           
         
       
     
    

    The link to the documentation

提交回复
热议问题