v1.12.0 版本更新

This commit is contained in:
shengzhang
2021-01-12 01:01:23 +08:00
parent 1ce7b945d8
commit ba640295c5
23 changed files with 63 additions and 41 deletions

View File

@@ -1,11 +1,11 @@
<p align="center">
<img alt="logo" src="https://gitee.com/sz6/sa-token/raw/master/sa-token-doc/doc/logo.png" width="150" height="150" style="margin-bottom: 10px;">
</p>
<h1 align="center" style="margin: 30px 0 30px; font-weight: bold;">sa-token v1.11.0</h1>
<h1 align="center" style="margin: 30px 0 30px; font-weight: bold;">sa-token v1.12.0</h1>
<h4 align="center">这可能是史上功能最全的Java权限认证框架</h4>
<h4 align="center">
<a href="https://gitee.com/sz6/sa-token/stargazers"><img src="https://gitee.com/sz6/sa-token/badge/star.svg"></a>
<a href="https://github.com/click33/sa-token"><img src="https://img.shields.io/badge/sa--token-v1.11.0-2B9939"></a>
<a href="https://github.com/click33/sa-token"><img src="https://img.shields.io/badge/sa--token-v1.12.0-2B9939"></a>
<a href="https://github.com/click33/sa-token/stargazers"><img src="https://img.shields.io/github/stars/click33/sa-token"></a>
<a href="https://github.com/click33/sa-token/watchers"><img src="https://img.shields.io/github/watchers/click33/sa-token"></a>
<a href="https://github.com/click33/sa-token/network/members"><img src="https://img.shields.io/github/forks/click33/sa-token"></a>
@@ -71,6 +71,7 @@ StpUtil.getSessionByLoginId(10001); // 获取账号id为10001的Session
StpUtil.getTokenValueByLoginId(10001); // 获取账号id为10001的token令牌值
StpUtil.setLoginId(10001, "PC"); // 指定设备标识登录
StpUtil.logoutByLoginId(10001, "PC"); // 指定设备标识进行强制注销 (不同端不受影响)
StpUtil.switchTo(10044); // 将当前会话身份临时切换为其它账号
```
sa-token的API众多请恕此处无法为您逐一展示更多示例请戳官方在线文档

View File

@@ -22,6 +22,7 @@
<nav>
<select onchange="location.href=this.value">
<option value="http://sa-token.dev33.cn/doc/index.html">最新版</option>
<option value="http://sa-token.dev33.cn/v/v1.11.0/doc/index.html">v1.11.0</option>
<option value="http://sa-token.dev33.cn/v/v1.10.0/doc/index.html">v1.10.0</option>
<option value="http://sa-token.dev33.cn/v/v1.9.0/doc/index.html">v1.9.0</option>
<option value="http://sa-token.dev33.cn/v/v1.8.0/doc/index.html">v1.8.0</option>
@@ -40,7 +41,7 @@
</div>
<script>
var name = '<img style="width: 50px; height: 50px; vertical-align: middle;" src="logo.png" alt="logo" /> ';
name += '<b style="font-size: 24px; vertical-align: middle;">sa-token</b> <sub>v1.11.0</sub>'
name += '<b style="font-size: 24px; vertical-align: middle;">sa-token</b> <sub>v1.12.0</sub>'
window.$docsify = {
name: name, // 名字
repo: 'https://github.com/click33/sa-token', // github地址

View File

@@ -1,6 +1,14 @@
# 更新日志
### 2021-1-12 @v1.12.0
- 新增提供JWT集成示例 **[重要]**
- 新增:新增路由式鉴权,可方便的根据路由匹配鉴权 **[重要]**
- 新增:新增身份临时切换功能,可在一个代码段内将会话临时切换为其它账号 **[重要]**
- 优化:将`SaCheckInterceptor.java`更名为`SaAnnotationInterceptor.java`,更语义化的名称
- 优化:优化文档
### 2021-1-10 @v1.11.0
- 新增提供AOP注解鉴权方案 **[重要]**
- 优化自动生成token的算法

View File

@@ -9,10 +9,15 @@
<dependency>
<groupId>cn.dev33</groupId>
<artifactId>sa-token-spring-boot-starter</artifactId>
<version>1.11.0</version>
<version>1.12.0</version>
</dependency>
```
## Gradle依赖
Gradle用户引入依赖
```
implementation 'cn.dev33:sa-token-spring-boot-starter:1.12.0'
```

View File

@@ -18,7 +18,7 @@
<dependency>
<groupId>cn.dev33</groupId>
<artifactId>sa-token-spring-boot-starter</artifactId>
<version>1.11.0</version>
<version>1.12.0</version>
</dependency>
```

View File

@@ -90,7 +90,7 @@ mode有两种取值
<dependency>
<groupId>cn.dev33</groupId>
<artifactId>sa-token-spring-aop</artifactId>
<version>1.11.0</version>
<version>1.12.0</version>
</dependency>
```

View File

@@ -11,7 +11,7 @@
<dependency>
<groupId>cn.dev33</groupId>
<artifactId>sa-token-dao-redis</artifactId>
<version>1.11.0</version>
<version>1.12.0</version>
</dependency>
```
优点兼容性好缺点session序列化后基本不可读对开发者来讲等同于乱码
@@ -23,7 +23,7 @@
<dependency>
<groupId>cn.dev33</groupId>
<artifactId>sa-token-dao-redis-jackson</artifactId>
<version>1.11.0</version>
<version>1.12.0</version>
</dependency>
```
优点session序列化后可读性强可灵活手动修改缺点兼容性稍差