Spring security added prefix “ROLE_” to all roles name?

前端 未结 5 1529
被撕碎了的回忆
被撕碎了的回忆 2020-12-01 12:00

I have this code in my Web Security Config:

 @Override
protected void configure(HttpSecurity http) throws Exception {
    http
            .authorizeRequests         


        
5条回答
  •  借酒劲吻你
    2020-12-01 12:44

    Spring security adds the prefix "ROLE_" by default.

    If you want this removed or changed, take a look at

    How to change role from interceptor-url?

    EDIT: found this as well: Spring Security remove RoleVoter prefix

提交回复
热议问题