使用jsp为模板的时候  shiro的引用是这样的:<%@ taglib uri="http://shiro.apache.org/tags"
prefix="shiro"%>

现在用thymeleaf这样引用就没用了,要这样引用:
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org"
xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
另外,需要导包并且简单配置一下
<!-- 兼容于thymeleaf的shiro --> <dependency>
<groupId>com.github.theborakompanioni</groupId>
<artifactId>thymeleaf-extras-shiro</artifactId> <version>2.0.0</version>
</dependency>




另外要注意
由于这个thymeleaf-extras-shiro包2.0.0以下的版本会导致找不到AbstractTextChildModifierAttrPr的错误,所以这个包的版本由1.2.1改成2.0.0 

好了 基本上整合shiro标签的步骤就是这些了。

友情链接
KaDraw流程图
API参考文档
OK工具箱
云服务器优惠
阿里云优惠券
腾讯云优惠券
华为云优惠券
站点信息
问题反馈
邮箱:ixiaoyang8@qq.com
QQ群:637538335
关注微信