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是经常遇到的,这里记录一下我经常遇到的一种情况,以免忘记. 我使用拦截器拦截所有请求,然后列出不拦截的请求.有时候由于自己 ...
随机推荐
- APICloud |UIChatTools 模块demo
UIChatTools 模块是一个聊天输入框模块,开发者可自定义该输入框的功能.通过 open 接口可在当前 window 底部打开一个输入框,该输入框的生命属于当前 window 所有.当输入框获取 ...
- mysql 字符集
mysql -u root -p 输入密码进入mysql show variables like 'character%'; --显示字符集,像这样 \q退出mysql, 更改mysql配置文件 vi ...
- Linux常用命令之-删除文件
在测试过程中,有时候会需要删除一些文件,例如日志文件过大等,这里汇总一些删除文件常用的命 已这个系统内的文件为例 删除文件(即这个文件被删除) 单个删除:rm -f + 文件名 eg:rm -f 2 ...
- 3.3.1 MyBatis框架介绍
MyBatis框架介绍 1. 什么是框架 (1) 框架是偷懒的程序员将代码进行封装, 之后进行重复使用的过程. (2) 框架其实是一个半成品, 以连接数据库为例, 连接数据库使用的驱动, url, 用 ...
- h5样式布局
在文字的左面加图标 background: url(../images/hi.png) left no-repeat; 如图所示
- hook
hook的定义 hook,钩子,勾住系统的程序逻辑. 在某段SDK源码逻辑执行的构成中,通过代码手段拦截执行该程序,加入自己的代码逻辑 使用价值 hook是安卓面向切面(aop)编程的基础,可以让我们 ...
- MVC模式笔记
参见:https://martinfowler.com/eaaCatalog/modelViewController.html 企业应用架构模式(P of EAA)第14章Web表现模式第一节MVC笔 ...
- 使用rsync在linux(客户端)拉取windows(服务端)数据
windows 服务端ip:172.18.18.70 Linux客服端ip: 172.18.54.11 1.windows服务端下载cwRsync Server , 地址:https://www.ba ...
- setup FTP server on CentOS 7
Setup FTP Server on CentOS 7 Install vsftpd vsftpd (Very Secure File Transport Protocol Daemon) is a ...
- Hadoop集群故障诊断
集群故障诊断通行方法:1.cloudera manager 监控和管理软件本身出问题了(没有任何数据),集群还是好的,业务还在正常跑:2.监控软件是好的,从监控里发现了很多问题,如CPU飙高.内存飙高 ...