首页 > 其他分享 >shiro整合thymeleaf

shiro整合thymeleaf

时间:2022-12-19 11:44:22浏览次数:37  
标签:1.10 spring level1 thymeleaf 整合 shiro

1、依赖

        <dependency>
            <groupId>org.apache.shiro</groupId>
            <artifactId>shiro-spring</artifactId>
            <version>1.10.0</version>
        </dependency>

2、使用

<div shiro:hasPermission='"user:level1"'>
<a th:href="@{/user/level1}" >level1</a>
</div>
    <a th:href="@{/toLogin}" th:if="${session.loginUser == null}">登录</a>

标签:1.10,spring,level1,thymeleaf,整合,shiro
From: https://www.cnblogs.com/yanshiheng/p/16991783.html

相关文章

  • spring boot 整合 FastDFS_Client
    FastDFS-Client使用方式1.在项目Pom当中加入依赖Maven依赖为<dependency><groupId>com.github.tobato</groupId><artifactId>fastdfs-client</artifactId><vers......
  • Spring boot整合 Swagger2 以及遇到的坑
    一、引入依赖:<dependency><groupId>io.springfox</groupId><artifactId>springfox-swagger2</artifactId><version>2.5.0</version></dependency><dependency><gro......
  • spring boot —— 整合Scheduling定时任务
    Spring3.0后提供SpringTask实现任务调度,支持按日历调度,相比Quartz功能稍简单,但是在开发基本够用,支持注解编程方式。使用启用在springboot启动类上添加注解:@EnableSch......
  • Thymeleaf利用layout.html文件生成页面布局框架
    1.layout.html文件生成布局<!DOCTYPEhtml><htmllang="zh-CN"xmlns:th="http://www.thymeleaf.org"xmlns:layout="http://www.ultraq.net.nz/web/thymeleaf/layout">......
  • Rest接口和Thymeleaf的两个坑
    springbootthymeleaf热部署在使用springboot开发的时候,使用了Thymeleaf作为前端的模板开发,发现在调试过程中,改动了Thymeleaf模板后,需要重新启动下项目,才可以立即生效......
  • shiro使用
    1、依赖<dependency><groupId>org.apache.shiro</groupId><artifactId>shiro-spring</artifactId><version>1.10.0</ver......
  • ssm整合
    Spring框架:Spring框架为了解决软件开发的复杂性而创建的。Spring使用的是基本的JavaBean来完成以前非常复杂的企业级开发。Spring解决了业务对象,功能模块之间的耦合,不仅在j......
  • javaclient操作kafka&springboot整合kafka&kafka分区
    1.javaclient测试kafka1.配置kafka允许远程推送修改config/Kraft/server.properties文件,,将地址变为服务器公网IP地址。advertised.listeners=PLAINTEXT://localhost:90......
  • SSM整合环境搭建+Maven+IDEA
    优先推荐这个案例,真的超级详细,自己跟着一步一步做就可以了这篇案例做的也不错,可以看看。......
  • 3.整合MyBatis 3.1整合步骤
    第一步,按照第2.2节中的内容创建SpringBoot项目,项目创建完成之后打开pom.xml,添加如图3.1所示依赖  如图3.1    图中mybatis-spring-boot-starter是与MyBati......