My Spring Boot application works on Spring Security 3.2.7.RELEASE
. Now, I'd like to update it to 4.0.2.RELEASE
.
After hours of debug I have found that Spring Security 4.0.2.RELEASE uses defaultRolePrefix="ROLE_"
in
org.springframework.security.access.expression.SecurityExpressionRoot.hasAnyAuthorityName(String prefix, String... roles)
method
In my application I use roles without this prefix and accordingly I get AccessDeniedException
.
How to configure Spring Boot in order to use SecurityExpressionRoot.defaultRolePrefix=""
?