Spring Spring about the role of the role ResponseBody annotations on annotations ResponseBody

Spring annotation role of ResponseBody

responseBody generally acting on the process, plus the annotation indicates that the method returns the result directly written Http response Body, commonly used in ajax asynchronous request,

In RequestMapping return value in return the default path resolved to jump, if you want Controller at this time to return a string or an object to the front desk will report 404 not response errors.

When coupled @ResponseBody annotations not resolved to the branch address will be resolved to the appropriate format json xml object set string or the like can be returned directly to the front of ajax "success": fucntion (data) {} data direct access to.

Guess you like

Origin www.cnblogs.com/wskb/p/11570649.html