The use of Ajax:
Precautions:
DataType: "JSON" can be written in Ajax without writing (Ajax can automatically recognize the return value type), written more standardized, you can identify the wrong return value type of Ajax, specify the return value type so that there is no error.
The @responsebody annotation must be written on the class method, and the returned data can be written directly to the response text. It is more used when the AJAX process requests asynchronously.
Apputil.returnobject (New Pagedata (), PD); It's also possible to change the PD here to map.
Apputil.returnobject (Pd,map) method of source code:
After reading the source I found that this method does not need to be converted into JSON format.
Directly return the map, written in response text by @responsebody, (Ajax datatype: "JSON") can be written and written in a more canonical.
The application of Ajax in SPRINGMVC to considerations