thymeleaf模板整合shiro标签
来源:互联网 发布:windows api pdf 编辑:程序博客网 时间:2024/06/06 05:11
一、引入依赖
<dependency><groupId>org.thymeleaf</groupId><artifactId>thymeleaf-spring4</artifactId><version>3.0.5.RELEASE</version></dependency><dependency> <groupId>com.github.theborakompanioni</groupId> <artifactId>thymeleaf-extras-shiro</artifactId> <version>2.0.0</version></dependency>二、配置
<bean id="templateResolver"class="z3.dbus.web.mvc.Z3ThymeleafViewResolver"><property name="prefix" value="/WEB-INF/view/" /><property name="suffix" value=".html" /><!-- HTML is the default value, added here for the sake of clarity. --><property name="templateMode" value="HTML" /><!-- Template cache is true by default. Set to false if you want --><!-- templates to be automatically updated when modified. --><property name="cacheable" value="true" /></bean><bean id="templateEngine" class="org.thymeleaf.spring4.SpringTemplateEngine"><property name="templateResolver" ref="templateResolver" /><property name="enableSpringELCompiler" value="true" /><property name="additionalDialects"> <set> <bean class="at.pollux.thymeleaf.shiro.dialect.ShiroDialect"/> </set> </property> </bean>
三、标签使用
1、加入html命名空间
<html xmlns:th="http://www.thymeleaf.org" xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity4" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">2、加入shiro标签
<shiro:guest> <a>登录</a> <a>注册</a></shiro:guest> <shiro:user> 欢迎<shiro:principal property="name"/></shiro:user>
1 0
- thymeleaf模板整合shiro标签
- spring boot 使用thymeleaf 和shiro标签整合
- thymeleaf模板引擎和shiro框架的整合
- SpringMVC整合Thymeleaf模板
- springboot整合thymeleaf模板
- SpringBoot整合thymeleaf模板
- Spring boot项目整合thymeleaf和shiro
- spring-boot--整合thymeleaf模板
- SpringBoot整合模板引擎Thymeleaf
- spring-boot--整合thymeleaf模板
- spring mvc + shiro +thymeleaf 扩展使用shiro tags页面标签
- Spring Boot整合Thymeleaf模板引擎
- (二)springboot整合thymeleaf模板
- Thymeleaf模板HTML5没有结束标签解决办法
- shiro与thymeleaf结合使用时,前台shiro标签没有生效
- Apache Shiro Web应用整合-标签库
- Apache Shiro Web应用整合-标签库
- thymeleaf 标签
- cooseek使用总结
- LeetCode 485. Max Consecutive Ones
- The C++ Programming Language 读书笔记(三)
- 为JFileChooser设定扩展名过滤
- Java ---自定义标签
- thymeleaf模板整合shiro标签
- 新手第一步
- 儿童信仰问答 翻译:煦译自: First Catechism--Biblical Truth for God's Children --Published by Great Commission Pu
- java IO 系统
- hud题目分类
- MFC 控件背景色
- 深度学习 13. 能力提升, 一步一步的介绍如何自己构建网络和训练,利用MatConvNet(二),思路整理
- 连接oracle报错“ORA-28547:connection to server failed,probable Oracle Net admin 解决办法
- jQuery中的$(window).load()与$(document).ready()