See also:
###Download
Maven
<repositories>
<repository>
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>bintray-usydapeng-maven</id>
<name>bintray</name>
<url>http://dl.bintray.com/usydapeng/maven</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>org.zunpeng</groupId>
<artifactId>thymeleaf3-shiro</artifactId>
<version>0.0.1</version>
<type>pom</type>
</dependency>
</dependencies>
gradle
repositories {
jcenter()
}
dependencies {
compile 'org.zunpeng:thymeleaf3-shiro:0.0.1'
}
See http://shiro.apache.org/tags and http://shiro.apache.org/web.html#Web-JSP%252FGSPTagLibrary
<shiro:guest>
<p>Please <a href="login.html">Login</a></p>
</shiro:guest>
preferred approach:
<p shiro:guest="">Please <a href="login.html">Login</a></p>
<shiro:user>
<div>Welcome back John! Not John? Click <a href="login.html">here<a> to login.</div>
</shiro:user>
preferred approach:
<div shiro:user="">
Welcome back John! Not John? Click <a href="login.html">here<a> to login.
</div>
<shiro:hasRole name="administrator">
<a href="admin.html">Administer the system</a>
</shiro:hasRole>
preferred approach:
<a shiro:hasRole="administrator" href="admin.html">Administer the system</a>
<shiro:lacksRole name="administrator">
<p>Sorry, you are not allowed to administer the system.</p>
</shiro:lacksRole>
preferred approach:
<p shiro:lacksRole="administrator">
Sorry, you are not allowed to administer the system.
</p>
<shiro:hasAnyRoles name="developer, project manager, administrator">
<div class="message">You are either a developer, project manager, or administrator.</div>
</shiro:hasAnyRoles>
preferred approach:
<div shiro:hasAnyRoles="developer, project manager, administrator" class="message">
You are either a developer, project manager, or administrator.
</div>
<shiro:hasAllRoles name="developer, project manager, administrator">
<div class="message">You are either a developer, project manager, or administrator.</div>
</shiro:hasAllRoles>
preferred approach:
<div shiro:hasAllRoles="developer, project manager, administrator" class="message">
You are either a developer, project manager, or administrator.
</div>
<shiro:hasPermission name="user:create">
<a href="createUser.html">Create a new User</a>
</shiro:hasPermission>
preferred approach:
<a shiro:hasPermission="user:create" href="createUser.html">Create a new User</a>
<shiro:hasAllPermissions name="user:create">
<a href="createUser.html">Create a new User</a>
</shiro:hasAllPermissions>
preferred approach:
<a shiro:hasAllPermissions="user:create" href="createUser.html">Create a new User</a>
<shiro:hasAnyPermissions name="user:create">
<a href="createUser.html">Create a new User</a>
</shiro:hasAnyPermissions>
preferred approach:
<a shiro:hasAnyPermissions="user:create" href="createUser.html">Create a new User</a>
<shiro:lacksPermission name="user:delete">
<p>Sorry, you are not allowed to delete user accounts.</p>
</shiro:hasPermission>
preferred approach:
<p shiro:lacksPermission="user:delete">Sorry, you are not allowed to delete user accounts.</p>