Spring MVC @ResponseBody return a List

后端 未结 7 1470
说谎
说谎 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:50

    You should rather use ResponseEntity for that. @ResponseBody gives you absolutely no control over the response.

提交回复
热议问题