Java Spring Jackons Date serialization

后端 未结 4 1205
野的像风
野的像风 2021-01-13 00:20

I\'m using Spring MVC and Jackson for JSON de/serialization. But im facing a problem with serializing a date.

By default Jackson serialize a date as an epoch. But i

4条回答
  •  梦谈多话
    2021-01-13 00:55

    I found the following to work with Spring Platform 2.0 (Spring 4.2) and Jackson 2.6.3

    pom.xml

    
      com.fasterxml.jackson.core
      jackson-databind
    
    
    
      com.fasterxml.jackson.datatype
      jackson-datatype-joda
    
    

    applicationContext.xml

    
      
         
           
             
             
               
                 
               
                            
             
           
         
               
    
    

提交回复
热议问题