admin管理员组

文章数量:1794759

spring mvc 同时支持get和post请求

spring mvc 同时支持get和post请求

@RequestMapping(value = "/api/component/imgconf/getimgconf",method = {RequestMethod.post, RequestMethod.GET}) @ResponseBody public Object getImgConf(HttpServletRequest request, @RequestParam(value = "downImageConfigRequest", required = true) String json){ //此处省略很多代码 }

这样终端发起请求的时候可以用post也可以用get。get的可以这样请求/api/component/imgconf/getimgconf.do?json="参数值"

本文标签: springMVCpost