shiro注解和标签

Controller中注解:

@RequiresAuthentication

@RequiresGuest 

@RequiresPermissions("account:create")

@RequiresRoles("administrator")

@RequiresUser

Themleaf标签:

<shiro:principal />

<shiro:principal property="username" />

<shiro:hasRole name="admin"></shiro:hasRole>

posted @ 2018-03-05 11:38  jack_zou2018  阅读(178)  评论(0编辑  收藏  举报