Spring MVC -> JSON response

前端 未结 5 1809
太阳男子
太阳男子 2020-12-05 08:51

I hava a JAVA EE backend and I am using Spring MVC. I have a AJAX call like this:

function getAllProjects() {
        $.getJSON(\"project/getall\", function(         


        
5条回答
  •  广开言路
    2020-12-05 09:16

    You need to read Chapter 15.5 of the Spring User Guide which describes how to configure MVC views, and Chapter 16.10 which briefly describes the JSON Mapping View. Then read the javadocs for MappingJacksonJsonView etc.

提交回复
热议问题