0
点赞
收藏
分享

微信扫一扫

thymeleaf引入shrio的taglib标签


第一种情况是jsp页面中


<%@ taglib prefix="shiro" uri="​​http://shiro.apache.org/tags​​" %>


第二种情况是在html页面中引入

1.pom.xml文件中:
<dependency>
<groupId>com.github.theborakompanioni</groupId>
<artifactId>thymeleaf-extras-shiro</artifactId>
<version>1.2.1</version>
</dependency>
2.在Configuration配置类里面:
@Bean
public ShiroDialect shiroDialect() {
return new ShiroDialect();
}

3.页面<html xmlns:th="http://www.thymeleaf.org"
xmlns:shiro="http://www.pollix.at/thymeleaf/shiro" >

举报

相关推荐

0 条评论