thymeleaf-extras-shiro(根据当前用户的权限显示对应的标签) 与 shiro的加盐加密

Shiro权限与缓存管理

1.thymeleaf-extras-shiro

根据当前用户的权限显示对应的标签

1.导入依赖

<!--thymeleaf shiro 根据权限标签显示-->
<!--shiro与themeleaf集成-->
<dependency>
<groupId>com.github.theborakompanioni</groupId>
<artifactId>thymeleaf-extras-shiro</artifactId>
<version>2.0.0</version>
</dependency>

2.在ShiroConfiguration 配置

/* 配置shiro thymeleaf 标签
* */
@Bean
public ShiroDialect shiroDialect() {
   
   
return new ShiroDialect();
}

3. 导入shiro标签

<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org"
xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
<h3>index</h3>
<div>
<a href="/user/add"> 增加用户</a>
<a href="/user/logout"> 注销</a>
<br>
<a href="/goods/add">增加商品</a>
<a href="/goods/delete">删除商品</a>
<a href="/goods/update">更新商品</a>
<a href="/goods/get">获取单个商品</a>
<a href="/goods/getAllGoods"
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值