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 ...
随机推荐
- C++模板实现的AVL树
1 AVL树的定义 AVL树是一种自平衡二叉排序树.它的特点是不论什么一个节点的左子树高度和右子树的高度差在-1,0,1三者之间. AVL树的不论什么一个子树都是AVL树. 2 AVL树的实现 AVL ...
- 【dotnet跨平台】"dotnet restore"和"dotnet run"都做了些什么?
[dotnet跨平台]"dotnet restore"和"dotnet run"都做了些什么? 前言: 关于dotnet跨平台的相关内容.能够參考:跨平台.NE ...
- 几个简单的程序看PHP的垃圾回收机制
每一种计算机语言都有自己的自动垃圾回收机制,让程序员不必过分关心程序内存分配,php也不例外,但是在面向对象编程(OOP)编程中,有些对象需要显式的销毁,防止程序执行内存溢出. 一.PHP 垃圾回收机 ...
- OpenStack源码系列---起始篇
近一年来我负责公司云点的自动化部署工作,包括公司自有云平台方案.XenServer.vSphere.Ovirt和OpenStack的自动化安装部署,目前已经到了OpenStack这一部分.自动化部署首 ...
- T-SQL查询进阶--变量
概述 变量对于一种语言是必不可少的一部分,当然,对于T-SQL来讲也是一样.在简单查询中,往往很少用到变量,但无论对于复杂的查询或存储过程中,变量都是必不可少的一部分. 变量的种类 在T-SQL中,变 ...
- Why there are no job running on hadoop
Using hadoop1.3.0. I ran the example WordCount correctly in eclipse. But when I enter localhost:5003 ...
- 在Windows上使用libcurl发起HTTP请求
curl下载地址https://curl.haxx.se/download.html 当前最新版本为7.61.0 将下载的curl-7.61.0.zip解压,得到curl-7.61.0 在目录curl ...
- poj 1180 Batch Scheduling (斜率优化)
Batch Scheduling \(solution:\) 这应该是斜率优化中最经典的一道题目,虽然之前已经写过一道 \(catstransport\) 的题解了,但还是来回顾一下吧,这道题其实较那 ...
- linux网络配置及IP绑定
在学习时,参考了这篇文章:http://blog.csdn.net/collection4u/article/details/14127671:在这篇文章中作者讲述了VMware中虚机的三种网络模式: ...
- bzoj2436: [Noi2011]Noi嘉年华
我震惊了,我好菜,我是不是该退役(苦逼) 可以先看看代码里的注释 首先我们先考虑一下第一问好了真做起来也就这个能想想了 那么离散化时间是肯定的,看一手范围猜出是二维DP,那对于两个会场,一个放自变量, ...