security工作笔记006---oauth2(spring security)报错method_not_allowed(Request method 'GET' not supported)解决
JAVA技术交流QQ群:170933152
最近做智慧城市项目,太恶心了。。。各种不会,个人负责权限验证中心服务,。。。唉,慢慢研究吧。。
报错信息
<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 {
...@Overridepublic void configure(AuthorizationServerEndpointsConfigurer endpoints) throws Exception {...endpoints.allowedTokenEndpointRequestMethods(HttpMethod.GET, HttpMethod.POST);// add get method...endpoints.tokenServices(tokenServices);}
...
}
security工作笔记006---oauth2(spring security)报错method_not_allowed(Request method 'GET' not supported)解决相关推荐
- navicat连接pgsql报错:authentication method 10 not supported
navicat连接pgsql报错:authentication method 10 not supported 解决方案:找到pgsql的安装目录下的pg_hba.conf文件 用文本编辑器打开后做如 ...
- security框架工作笔记001--- Shiro和Spring Security对比_智慧城市项目中选型用Spring Security
JAVA技术交流QQ群:170933152 Shiro简介 Apache Shiro是Java的一个安全框架.目前,使用Apache Shiro的人越来越多,因为它相当简单,对比Spring Secu ...
- spring单元测试报错:Failed to load ApplicationContext 的解决方法
使用idea 配置单元测试之后,配置完spring的注解@junit 和@runer 之后 一直报错. 最后发现是默认使用jdk1.8引起的,使用jdk1.7即可. 转载于:https://www.c ...
- SpringCloud工作笔记061---springBoot maven 打包jar报错_serverEndpointExporter
JAVA技术交流QQ群:170933152 代码可以正常运行,websocket也是正常工作,但打包成jar就会报如下错误 Error starting ApplicationContext. To ...
- Spring MVC报错:The request sent by the client was syntactically incorrect ()
springmvc数据绑定是一个很好的东西,在数据绑定的时候一定要主意Controller方法中的参数名和jsp页面里的参数名字是否一致或者按照绑定的规范来写,如果不一致,可能会报如下错误: The ...
- 【SpringBoot的坑】Restful请求报错Request method 'POST' not supported,HiddenHttpMethodFilter无法将POST转换为PUT原因分析
直接上结论: 因为 SpringBoot 版本原因,在我目前使用的 2.2.4 版本中,需要在springapplication.xml文件中 添加配置: spring.mvc.hiddenmetho ...
- Spring Security 源码分析:Spring Security 授权过程
Spring Security是一个能够为基于Spring的企业应用系统提供声明式的安全访问控制解决方案的安全框架.它提供了一组可以在Spring应用上下文中配置的Bean,充分利用了Spring I ...
- 解决Spring Boot报错Mapped Statements collection already contains value for...Error while adding the mapp
解决Spring Boot报错Mapped Statements collection already contains value for...Error while adding the mapp ...
- spring 笔记2:Spring MVC : Did not find handler method for 问题的解决
spring 笔记2:Spring MVC : Did not find handler method for 问题的解决 参考文章: (1)spring 笔记2:Spring MVC : Did n ...
最新文章
- Tungsten Fabric SDN — 与 Bare Metal 的集成架构
- java浏览器实验报告_关于java实验报告模板
- [待解决]报错的脚本
- 组态王6.55安装教程
- 【Floyed】小萨的烦恼(ssl 1624)
- 随想录(插件的重要思想)
- windows资源监控
- windows 上安装 python3.7 和 pip 并配置虚拟环境
- 小冰与老东家微软达成战略合作,并宣布数亿元Pre-A轮融资,将全面开展商业化
- 量子纠缠2——CHSH不等式
- Winform 实现无边框窗体移动功能
- s查看oracle空间分配,Oracle查看表空间使用率(包括临时表空间)
- Oracle 锁表查询语句及解锁
- Self-Supervised Vision Transformers with DINO-代码研读
- css缩2个字,首行缩排2字元怎么设定 css
- 如何做一个一键吸空投箱的效果
- 《前端》localStorage 和 sessionStorage-将数据存入(取出)缓存的方法-2020年10月6日
- 51nod 2075 图书管理员
- 喜讯科技——桥梁防船撞预警系统
- 【线上分享】全球多媒体视频内容保护最佳实践