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是经常遇到的,这里记录一下我经常遇到的一种情况,以免忘记. 我使用拦截器拦截所有请求,然后列出不拦截的请求.有时候由于自己 ...
随机推荐
- ide phpStorm注释模板修改
1.打开设置 2.找到,如下图所示位置,注意是第二个tab(Includes) 3.再任意空白位置,输入/**,按回车即可出现对应注释内容(其实还可以先 Ctrl + Shift + /,然后删少一个 ...
- 栈->栈与递归
文字简述 1.阶乘函数 2.2阶Fiibonacci数列 3.n阶Hanoi塔问题 代码实现 // // Created by lady on 19-4-3. // #include <stdi ...
- ionic3 添加多个自定义组件
往往我们创建自定义组件一般都不止只会创建一个自定义组件,创建多个方式如下. 1.创建自定义组件 ionic g component select-car-no ionic g component ae ...
- Python_tkinter(3)_grid布局
Grid(网格)布局管理器,是Tkinter里面最灵活的几何管理布局器.注意:不要试图在一个主窗口中混合使用pack和grid. 1.简单的布局 from tkinter import * root ...
- rapidjson对于json的序列化与反序列化
转载: https://blog.csdn.net/qq849635649/article/details/52678822 #include "rapidjson/stringbuffer ...
- 使用STS创建springboot项目pom.xml文件报错org.apache.maven.archiver.MavenArchiver.getManifest
首先我的STS版本时:3.7.3 解决办法:->help->Install New Software -> add->location ->输入: http://repo ...
- file_get_contents("php://input")的用法
$data = file_get_contents("php://input"); php://input 是个可以访问请求的原始数据的只读流. POST 请求的情况下,最好使用 ...
- mac OSx 安装 mysqlclient
首先需要安装 按照提示操作 brew install mysql-connector-c 然后 修改mysql_config 执行mysql_config可以看到文件所在位置 我的目录放在 /usr ...
- VMVare的窗口自适应
啊!好久没来博客园了.原因很简单,我把密码丢了. 最近才从系统申请重置了密码,这不,又能登录了.你可能好奇,是的,我也在疑惑:我是不是搞IT的啊?因为只要密码丢失,我就认为世界完蛋了,我完蛋了:) 这 ...
- 00JAVA语法基础_动手动脑
1.仔细阅读示例: EnumTest.java,运行它,分析运行结果? 枚举类型的使用是借助ENUM这样一个类,这个类是JAVA枚举类型的公共基本类.枚举目的就是要让某个变量的取值只能为若干固定值中的 ...