WARN PageNotFound:208 - Request method 'POST' not supported
在地址栏输入网址访问页面 ,用的是GET方法。
在用ajax接收后台数据,根据返回值进行提示或页面跳转时报:WARN PageNotFound:208 - Request method 'POST' not supported
原因是在第二次加载登陆界面时,用的是POST方法,所以在controller中的 method=" ",方法要补充上post 或者 不写method。
@RequestMapping(value="/login",method=RequestMethod.GET)
public String login()
{
return "login";
}
改成:
@RequestMapping(value="/login",method ={RequestMethod.GET,RequestMethod.POST})
public String login()
{
return "login";
}
或者:
@RequestMapping(value="/login")
public String login()
{
return "login";
}
WARN PageNotFound:208 - Request method 'POST' not supported的更多相关文章
- 常见踩坑案例(二)-Request method 'POST' not supported
一 前言 最近涉及到与前后端的数据对接,按道理来说没一点压力结果被一前端童鞋带坑里去了(不过也是很久没写过这种前后端分离进行联调的事情了,如果是一个人全套弄的话就不会出现下面问题). 二 Reques ...
- 记另类Request method 'GET' not supported
一般遇到Request method 'GET' not supported这种问题,大家都会找相应controller下的具体方法,把get改为post之类.但是我这次是在访问静态资源,static ...
- Spring boot: Request method 'DELETE' not supported, Request method 'PUT' not supported, Request method 'POST' not supported
GET,POST,PUT,DELETE, Spring都支持,不要怀疑Spring, 一定是前端发送的rest 请求和后端的响应不匹配, 查找原因以及解决办法, 很简单 用chrome打开F12控制台 ...
- org.springframework.web.HttpRequestMethodNotSupportedException: Request method 'PUT' not supported
1:先上控制台报错信息 org.springframework.web.HttpRequestMethodNotSupportedException: Request method 'PUT' not ...
- SpringMVC框架出现 405 request method post not supported 的解决方法
在SpringMVC框架中当使用post请求服务,然后请求成功转到一个静态文件,如html,htm等网页时.页面出现405 request method post not supported错误,只要 ...
- Request method 'POST' not supported错误和解决方法
在使用SpringBoot的时候,在html页面用form表单post提交数据的时候报错: Request method 'POST' not supported 错误解析: 我是用的前端页面是HTM ...
- springmvc访问静态资源出现Request method 'GET' not supported
答案最后.:D 默认的访问的URL都会被DispatcherServlet所拦截. 这里说一下如何配置springmvc访问静态文件. <mvc:default-servlet-handler/ ...
- Request method 'GET' not supported
Request method 'GET' not supported 错误原因: GET请求不被允许. 解决方法: 1.从客户端入手.假设浏览器中的js用了ajax发起异步请求GET,将GET改为PO ...
- 警告: Request method 'POST' not supported的原因之一
警告: Request method 'POST' not supported是经常遇到的,这里记录一下我经常遇到的一种情况,以免忘记. 我使用拦截器拦截所有请求,然后列出不拦截的请求.有时候由于自己 ...
随机推荐
- ip通信第七周
局域网的优点:1.具有较高的数据传输率 2.具有较低的误码率 3.具有较低的时延 4.能进行广播 网桥的基本特征:1.网桥在数据链录层上实现局域网互连 2.网桥能够互连两个采用不同数据链路层协议,不同 ...
- Python reverse()方法--list
描述 reverse()方法:用于反转列表元素的排列顺序. 语法 语法格式:list.reverse() 参数 NA 返回值 无返回值 实例 #!/usr/bin/python3 a = ['abc' ...
- Timestamp “时间戳” - 术语
A timestamp is a sequence of characters or encoded information identifying when a certain event occu ...
- API网关学习及介绍
一.什么是API网关 API网关是一个服务器,是系统的后端统一入口.首先,它会提供最基本的路由服务,将调用转发到上游服务.其次,作为一个入口,它还可以进行认证,鉴权,限流等操作,对上游服务保护.所以说 ...
- 出现error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
查看自己python的版本,然后下载自己版本Python的devel,比如python3.6.8就是 sudo apt-get install python3.6-dev
- 【Idea】-NO.163.Idea.2 -【How to show the horizontal scroll?】
Style:Mac Series:Java Since:2018-09-10 End:2018-09-10 Total Hours:1 Degree Of Diffculty:5 Degree Of ...
- Module 3 - Azure - Web Apps
Module 3 - 微软云 Azure - Web Apps 1. Create new Web application in the Azure Portal Azure Portal -> ...
- Cocos Creator 橡皮差(刮刮卡)功能(转)
实现一个刮刮卡的效果,于是在论坛里搜集了一些资料并且看了一下CCMask的源码,做出来一套可用的教程,分享给大家.(WEBGL和Native端测试可用) maskNode是详细设置如下 我们在 scr ...
- 黑苹果,Win7,Win10,Xp 各个系统镜像文件下载地址(备用)
windows Mac Xp(系统镜像下载装系统专区)百度系统世家也可 http://www.xp933.com/download/ 黑苹果系统(各种驱动型号下载专区) http://www.it36 ...
- Lintcode: Nuts & Bolts Problem
Given a set of n nuts of different sizes and n bolts of different sizes. There is a one-one mapping ...