I have the next method:
@RequestMapping(value="/busqueda/basica", method = {RequestMethod.POST,RequestMethod.GET})
public String busquedaBasica(HttpServletRequest request,
HttpServletResponse response,
ModelMap modelMap,
@RequestParam("nombreBasica") String nombre){
...
}
Is there any way to get the method's request, POST or GET?
是的, HttpServletRequest
具有一个getMethod()
,该方法返回一个表示HTTP方法的String
值。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.