Spring MVC Role and Permission to Admin

前端 未结 4 1284
清歌不尽
清歌不尽 2020-12-06 20:31

I am new in spring mvc , In my existing project , there is one admin and they have rights to update data , but now i need to create 2 new admin , admin1 and admin2 that can

4条回答
  •  情歌与酒
    2020-12-06 21:18

    you have to consider using Spring security to achieve this.check the following

    
     
    
    

    It means, only user with authority of “ROLE_ADMIN” is allowed to access URI /admin*. If non authorized user try to access it, a “http 403 access denied page” will be displayed.

    you have to configure the urls and the allowed access to them

    simple example at http://www.mkyong.com/spring-security/spring-security-access-control-example/

提交回复
热议问题