Springmvc注解@RequestMapping(七) - 日理万妓 2022-06-12 05:10 192阅读 0赞 **requestMapping(“hello”)** requestMapping(“/hello.do”) requestMapping(value=”/hello.do”) ![Image 1][] requestMapping(value=”/hello.do”,method=RequestMethod.GET) ![Image 1][] requestMapping(value=”/hello.do”,method=RequestMethod.POST) 浏览器直接访问,a标签都是get请求 表单提交(指定post),ajax指定post提交,post提交。 注:如果未按方法指定的方法提交会报错405 ![Image 1][] requestMapping(value=”/hello.do”,method=\{RequestMethod.POST,RequestMethod.GET\}) ![Image 1][] [Image 1]:
还没有评论,来说两句吧...