Comparative analysis of @requestParam and @requestBody

different:

   @requestParam used to get requests

       @requestParam ( "barCode" String barCode); BARCODE understood to get the value of the request parameter attribute assigned BARCODE field; if the parameter is not BARCODE attributes will be reported abnormal

   @requestBody post request to request for a request body, in the post request, the layer must have a controller to accept the request requestBody mention,

 

attention: in the comment, if not specified in parentheses is a comment in which property to accept, the default is the first;

Guess you like

Origin www.cnblogs.com/chenlongsheng/p/11098177.html