oauth2(spring security)报错method_not_allowed(Request method 'GET' not supported)解决方法
报错信息
<MethodNotAllowed>
<error>method_not_allowed</error>
<error_description>Request method 'GET' not supported</error_description>
</MethodNotAllowed>
39是单引号
原因
默认只支持post
解决方法
下载安装postman工具(或其他post工具)
使用post调用

代码增加get的方法
@Configuration
public class OAuthSecurityConfig extends AuthorizationServerConfigurerAdapter {
...
@Override
public void configure(AuthorizationServerEndpointsConfigurer endpoints) throws Exception {
...
endpoints.allowedTokenEndpointRequestMethods(HttpMethod.GET, HttpMethod.POST);// add get method
...
endpoints.tokenServices(tokenServices);
}
...
}
参考资料
oauth2(spring security)报错method_not_allowed(Request method 'GET' not supported)解决方法的更多相关文章
- spring单元测试报错:Failed to load ApplicationContext 的解决方法
使用idea 配置单元测试之后,配置完spring的注解@junit 和@runer 之后 一直报错. 最后发现是默认使用jdk1.8引起的,使用jdk1.7即可.
- 解压tar.gz文件报错gzip: stdin: not in gzip format解决方法
解压tar.gz文件报错gzip: stdin: not in gzip format解决方法 在解压tar.gz文件的时候报错 1 2 3 4 5 [Sun@localhost Downloads] ...
- org.springframework.web.HttpRequestMethodNotSupportedException: Request method 'GET' not supported解决!
org.springframework.web.HttpRequestMethodNotSupportedException: Request method 'GET' not supported解决 ...
- SpringBoot整合升级Spring Security 报错 【The request was rejected because the URL was not normalized】
前言 最近LZ给项目框架升级, 从Spring1.x升级到Spring2.x, 在这里就不多赘述两个版本之间的区别以及升级的原因. 关于升级过程中踩的坑,在其他博文中会做比较详细的记录,以便给读者参考 ...
- Openwrt 编译报错:rootfs image is too big解决方法
修改: tools/firmware-utils/src/mktplinkfw2.c static struct flash_layout layouts[] = { { .id = "8M ...
- PHP加密3DES报错 Call to undefined function: mcrypt_module_open() 的解决方法
我也是PHP新手,通过w3cschool了解了一下php基本原理之后就开写了.但仍是菜鸟. 先不管3DES加密的方法对不对,方法都是网上的,在运行的时候报了个错,把小弟整死了.找来找去终于自己摸出了方 ...
- scp报错:not a regular file,解决方法:加参数 -r
命令:scp -P1234 /data/aa root@192.0.0..0:/data 文件结构:/data/aa/yearmonth=2015-09 报错:not a regular fi ...
- MyEclipse 启动报错:'Building workspace' has encountered a problem解决方法
转载于:http://blog.csdn.net/v123411739/article/details/42645159 每次MyEclipse工作空间报错如下:'Building workspace ...
- oracle 11g R2安装报错ORA-00604及ORA-06553的原因及解决方法
10月31日PO主打算装oracle 11g R2,于是通过QQ旋风离线下载功能从oracle官网的链接下载了win32_11gR2_database_1of2.zip和win32_11gR2_dat ...
随机推荐
- HTML的常用标签和表格
拼接多个网页
- Intel Chipsets
http://en.wikipedia.org/wiki/Chipset Chipset From Wikipedia, the free encyclopedia A chipset is ...
- Vue 建立工程
npm install -g vue npm install -g vue-cli vue init webpack my-project cd my-project npm isntall npm ...
- FastDFS的配置、部署与API使用解读(4)FastDFS配置详解之Client配置(转)
一种方式是通过调用ClientGlobal类的初始化方法对配置文件进行加载,另一种是通过调用API逐一设置配置参数.后一种方式对于使用Zookeeper等加载属性的方式很方便. 1. 加载配置文件: ...
- c++ string 之 find_first_not_of 源码
一:实现之前先说一所find_first_not_of姊妹函数() (1)find_first_of(string &str, size_type index = 0):(find_first ...
- hdu 4858 项目管理(vector模拟)
# include <stdio.h> # include <algorithm> # include <string.h> # include <vecto ...
- 深入理解Atomic原子操作和volatile非原子性
原子操作可以理解为: 一个数,很多线程去同时修改它,不加sync同步锁,就可以保证修改结果是正确的 Atomic正是采用了CAS算法,所以可以在多线程环境下安全地操作对象. volatile是Java ...
- Memory cycles about Block
Block keeps a strong point to all object referenced in side of them, so all object will stay in heap ...
- (C)strcpy ,strncpy与strlcpy
1. 背景 好多人已经知道利用strncpy替代strcpy来防止缓冲区越界. 但是如果还要考虑运行效率的话,也许strlcpy是一个更好的方式. 2. strcpy strcpy 是依据 /0 作为 ...
- 有关定时器setTimeout()、setInterval()详解
JavaScript提供定时执行代码的功能,叫做定时器(timer),主要由setTimeout()和setInterval()这两个函数来完成. setTimeout() setTimeout函数用 ...