1. 程式人生 > >shiro註解和標簽

shiro註解和標簽

ons them str class div iss ini asr ica

Controller中註解:

@RequiresAuthentication

@RequiresGuest

@RequiresPermissions("account:create")

@RequiresRoles("administrator")

@RequiresUser

Themleaf標簽:

<shiro:principal />

<shiro:principal property="username" />

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

shiro註解和標簽