springboot路径请求出现Request method 'POST' not supported的解决方法
2020-02-03 01:30
5362 查看
1.若在springboot请求(post)中出现以下情况的解决办法
2.可以在controller中配置请求的路径中支持**@RequestMapping(value = “/PostRequest”, method = {RequestMethod.POST})**即可
3.参考的解决此问题的网址,链接:https://blog.csdn.net/xingkaichun/article/details/92579001
springboot 同时支持get,post请求写法
@RequestMapping(value = “/GetPostRequest”, method = {RequestMethod.GET,RequestMethod.POST})
springboot 支持get请求写法
@RequestMapping(value = “/GetRequest”, method = {RequestMethod.GET})
或者
@GetMapping("/GetRequest")
springboot 支持post请求写法
@RequestMapping(value = “/PostRequest”, method = {RequestMethod.POST})
或者
@PostMapping("/PostRequest")
- 点赞
- 收藏
- 分享
- 文章举报
相关文章推荐
- Spring Boot出现Request method 'POST' not supported,深入源码原因分析
- 雷丰阳Springboot视频培训教程问题解决记录之六——奇怪的Request method 'POST' not supported 405错误
- SpringBoot 调用ajax POST 方法报Request method 'POST' not supported解决方法
- 在spring中使用ajax出现 Request method 'POST' not supported
- 在pring框架出现 405 request method post not supported 的解决方法
- curl发送post请求出现:Request method 'post' not supported
- 在servlet中GET请求可以通过HttpServletRequest的getRequestURL方法和getQueryString()得到完整的请求路径和请求所有参数列表,POST的需要getPa
- php ajax提交post请求出现数组被截断情况的解决方法
- Django POST请求 错误 forbidden(403) CSRF verification failed. Request aborted 解决方法
- spring boot tomcat 请求出现RFC 7230 and RFC3986的错误,解决办法
- 集成jcaptcha到spring-boot+maven项目中时出现java.lang.NoSuchMethodError: com.jhlabs.image.WaterFilter的问题的解决方法
- (request)get和post方法获取请求参数及乱码解决方法
- winrar解压spring出现“路径和文件名总长度必须不能超过 260 个字符!”错误的解决方法
- AFNetworking2.0请求数据时出现错误Requestfailed:unacceptablecontent-type:text/html解决方法
- Spring使用session,request,global sessiong作用域出现异常解决方法
- 通过httpwebrequest实现http的post和get方法莫名出现500内部服务器错误的解决办法
- 解决SpringMVC入参出现The request sent by the client was syntactically incorrect请求语法错误方法
- oauth2(spring security)报错method_not_allowed(Request method 'GET' not supported)解决方法
- 转载---HttpUrlConnection发送post请求汉字出现乱码的一个解决方法及其原因
- spring boot 本地图片不能加载(图片路径)的问题及解决方法