RequestBody request and usage scenarios RequestParam

@RequestBody

application / json time available form-data, x-www-form-urlencoded unavailable time

@RequestParam

(@RequestParam the Map the Map) the Application / json time, json string section is not available, url in? Add the parameter back to a form-data, x-www- form-urlencoded when available , but you want Headers in the Content-Type deleted

(@RequestParam waterEleId String, String enterpriseName @RequestParam) file application / JSON time, JSON string section is not available, url the? Parameter is added later to use , see a form-data, x-www- form-urlencoded when available, and the parameters may have no sequence (i.e., pass over the front end of the order parameter or parameters, and url parameters are not necessarily consistent with the order of back interface, as long as the same field name can be), but want Headers in Content-Type of Deletion

(@RequestParam Object object) regardless of the application / json, form-data, x-www-form-urlencoded not available

Neither @RequestBody nor @RequestParam, which receives no parameter is specified way

(Map map) (Object object) application / json time : json string section is not available, url Adds parameters behind unavailable? . Because is not specified, it does not know in the end is or? Add the parameter part with json string section behind why they can not use form-data, when x-www-form-urlencoded not available, see Figure II (HttpServletRequest request ) application / json unavailable form-data, when available x-www-form-urlencoded

Guess you like

Origin www.cnblogs.com/dgwblog/p/12650658.html