How do I use the Jersey JSON POJO support?

前端 未结 11 1824
离开以前
离开以前 2020-11-27 12:24

I have an object that I\'d like to serve in JSON as a RESTful resource. I have Jersey\'s JSON POJO support turned on like so (in web.xml):

  
         


        
11条回答
  •  春和景丽
    2020-11-27 13:11

    This did it for me - Jersey 2.3.1

    In the web.xml file :

    
    Jersey Web Application
    org.glassfish.jersey.servlet.ServletContainer
    
    jersey.config.server.provider.packages
    ;org.codehaus.jackson.jaxrs
    
    
    

    In the pom.xml file :

    
    org.glassfish.jersey.media
    jersey-media-json-jackson
    2.3.1
    
    

提交回复
热议问题