Spring security access with multiple roles

后端 未结 3 1075
说谎
说谎 2021-02-02 14:49

I want to define access for some pages for user who has one of following roles (ROLE1 or ROLE2)

I\'m trying to configure this in my spring security xml file as following

3条回答
  •  南笙
    南笙 (楼主)
    2021-02-02 15:05

    How try with , separate. See doc here and here.

    
    

    OR

    hasAnyRole('ROLE1','ROLE2')
    

提交回复
热议问题