spring security There was an unexpected error (type=Forbidden, status=403).

Posted weizhxa

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了spring security There was an unexpected error (type=Forbidden, status=403).相关的知识,希望对你有一定的参考价值。

https://blog.csdn.net/qq_27093097/article/details/83190240

 

spring security There was an unexpected error (type=Forbidden, status=403).

 

技术图片

原因是定义的角色名称不匹配

路径权限规则匹配中配置的是:ADMIN 这里程序猿不可以配置ROLE_开头的角色 不然直接报BUG

自定义权限验证中就要配置用户的权限:ROLE_ADMIN 需要加上ROLE_开头

这坑踩了两回 这设计很想吐槽

以上是关于spring security There was an unexpected error (type=Forbidden, status=403).的主要内容,如果未能解决你的问题,请参考以下文章

UVALive - 3882 —— And Then There Was One

iOS之There was an internal API error错误

G - And Then There Was One (约瑟夫环)

UVALive - 3882:And Then There Was One

UVALive 3882 And Then There Was One

There was an unexpected error (type=Not Found, status=404).