Spring MVC @ResponseBody return a List

后端 未结 7 1464
说谎
说谎 2021-02-10 03:22

We would like to create a \"WebService\" which return a list of specific objects. And we would like to call this webservice from another java program by apache http clients libr

7条回答
  •  不思量自难忘°
    2021-02-10 03:26

    During 2 days, i tried many ways : - responseEntity - httpheaders - XML etc...

    For a JSON (default behavior), the project need a library with all Spring library. Here the library to declare in Maven project.

    
        org.codehaus.jackson
        jackson-mapper-asl
        1.7.1
     
    

    Without this library, i have an Error (406).

    Thank you anyway for all your answers & advices.

提交回复
热议问题