How do I use custom roles/authorities in Spring Security?

前端 未结 5 1129
遥遥无期
遥遥无期 2020-12-02 08:37

While migrating a legacy application to spring security I got the following exception:

org.springframework.beans.factory.BeanCreationException: Error creatin         


        
5条回答
  •  独厮守ぢ
    2020-12-02 09:20

    This might also help:

    http://forum.springsource.org/showthread.php?96391-Spring-Security-Plug-in-ROLE_-prefix-mandatory

    Bassically, it says you have to write in grails-app/conf/spring/resources.groovy:

    roleVoter(org.springframework.security.access.vote.RoleVoter) {
        rolePrefix = ''
    }
    

    It worked for me.

提交回复
热议问题