Request method 'GET' not supported解决方式
There was an unexpected error (type=Method Not Allowed, status=405).
Request method ‘GET’ not supported
解决方案:
第一种情况:前台页面的表单在一些情况下没有指定POST方法:
Ajax没有指定POST方法:
后台方法在一定情况下需要指定POST方法:
第二种情况:前端参数类型与后台数据库中的存储类型不一致导致错误:
这种情况
(1)如果只需从前台获取则只需要将前台参数名避免与数据库中参数名一致
(2)如果只需传递参数,则可以用指定类型接收以后,自行转格式在放回数据库或实体类,表单等
(3)彻底解决的办法,很简单,再创建一个实体类或者在实体类中再添加两个所需的参数类型
摘自:https://www.cnblogs.com/jpfss/p/9670096.html
在我的问题中,因为未写前端页面所以我直接访问controller的add路径,并且未添加要添加的值所以导致出错,即:
http://localhost:8001/add
如果你有/list路径即查询整个数据库你会发现,不会报错
所以在我的这个错误中,是因为未在路径后添加值
eg:http://localhost:8001/dept/add?deptname=ddd。
Request method 'GET' not supported解决方式相关推荐
- security工作笔记006---oauth2(spring security)报错method_not_allowed(Request method 'GET' not supported)解决
JAVA技术交流QQ群:170933152 最近做智慧城市项目,太恶心了...各种不会,个人负责权限验证中心服务,...唉,慢慢研究吧.. 报错信息 <MethodNotAllowed> ...
- 解决Request method 'POST' not supported问题
问题: login.html中表单提交方式为POST. 用户登录Controller层直接跳转login.html,可以跳转,但若登录用户名或密码错误再次跳转login.html,则报错:Reques ...
- 浏览器出现Request method ‘GET‘ not supported (type=Method Not Allowed, status=405)的解决方法
Request method 'GET' not supported 不支持get请求方法,只支持POST方法 解决方案:把get请求改为post请求 一.火狐浏览器 Firefox可以直接编辑请求参 ...
- 我遇到的问题之request method ‘post’ not supported
文章目录 我遇到的问题之request method 'post' not supported 背景 尝试解决 源码大法好 总结 我遇到的问题之request method 'post' not su ...
- org.springframework.web.HttpRequestMethodNotSupportedException: Request method 'PUT' not supported
错误描述: org.springframework.web.HttpRequestMethodNotSupportedException: Request method 'PUT' not suppo ...
- 【SpringBoot的坑】Restful请求报错Request method 'POST' not supported,HiddenHttpMethodFilter无法将POST转换为PUT原因分析
直接上结论: 因为 SpringBoot 版本原因,在我目前使用的 2.2.4 版本中,需要在springapplication.xml文件中 添加配置: spring.mvc.hiddenmetho ...
- springboot项目中的 Request method 'POST' not supported问题
我碰到问题的情况 前端点击发送验证码按钮,IDEA控制台出现 WARN 1776 --- [nio-8888-exec-2] .w.s.m.s.DefaultHandlerExceptionResol ...
- Request method ‘GET‘ not supported,不支持GET形式访问
org.springframework.web.HttpRequestMethodNotSupportedException: Request method 'GET' not supported 原 ...
- postman发送post请求,服务器日志确保GET请求错误“ PageNotFound:208 Request method ‘GET‘ not supported”
一.事件经过 这段时间在配置菲律宾项目上k8s,今天在测试生产环境时,报了一个错: PageNotFound:208 Request method 'GET' not supported.意思是:请求 ...
最新文章
- sql语句练习50题(Mysql版-详加注释)
- socket通信函数的深入分析
- 客户跟进节奏(转至索菲外贸日记)
- python3 多线程_Python3多线程爬虫实例讲解
- Django开发中常用的命令总结
- 细丝极恐的华为251事件
- sprinboot整合activity
- dll文件用什么语言编写_为什么Unix不用功能更强大的C++而是用C编写
- Java中ArrayList、Integer[]和int[]的相互转换
- Visio 不能使用方向键移动图形的解决办法
- arduino 智能车组装步骤_Arduino 自动避障智能小车制作教程
- 74151/74LS151 8选1数据选择器
- 【大数据干货】基于Hadoop的大数据平台实施——整体架构设计
- VB通过洗牌算法生成随机数ID
- 微信公众平台开发[1] —— 获取用户Openid及个人信息
- Date对象在Safari与IOS中的“大坑”
- mysql生成uui mybatis_Mybatis【配置文件】详解
- Excel文件解析和结果回写
- Linux安装dos2unix的方法—绝对完全有用
- libigl第五章-参数化
热门文章
- CodeForces - 364A Matrix(思维+数学)
- HDU多校10 - 6880 Permutation Counting(dp+思维)
- Aizu - 1407 Parentheses Editor(对顶栈+模拟)
- HDU多校4 - 6813 Last Problem(构造)
- 中的多行卡片如何居中_编程中如何让图片垂直居中?两种方案分享给大家
- uva 10305拓扑排序
- PyCharm编写shell脚本无法运行
- HDU4416(后缀自动机)
- [HAOI2015][loj2127]按位或
- 最简单的基于FFmpeg的AVDevice例子(屏幕录制)