
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="参数值"
👁️ 阅读量:0
© 版权声明:本文《spring mvc 同时支持get和post请求》内容均为本站精心整理或网友自愿分享,如需转载请注明原文出处:https://www.zastudy.cn/wen/1686617005a306562.html。