Skip to content

Commit 37bbceb

Browse files
committed
⬆️ 升级 justauth-spring-boot-starter 版本为 1.1.0
1 parent 9701900 commit 37bbceb

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

spring-boot-demo-social/README.md

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,14 @@ $ nginx -s reload
237237
238238
## 2. 主要代码
239239

240+
> 本 demo 采用 Redis 缓存 state,所以请准备 Redis 环境,如果没有 Redis 环境,可以将配置文件的缓存配置为
241+
>
242+
> ```yaml
243+
> justauth:
244+
> cache:
245+
> type: default
246+
> ```
247+
240248
### 2.1. pom.xml
241249
242250
```xml
@@ -262,7 +270,7 @@ $ nginx -s reload
262270
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
263271
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
264272
<java.version>1.8</java.version>
265-
<justauth-spring-boot.version>1.0.0</justauth-spring-boot.version>
273+
<justauth-spring-boot.version>1.1.0</justauth-spring-boot.version>
266274
</properties>
267275
268276
<dependencies>
@@ -386,6 +394,10 @@ justauth:
386394
client-secret: 8G6PCr00j************************rgk************AyzaPc78
387395
redirect-uri: http://oauth.xkcoding.com/demo/oauth/wechat_enterprise/callback
388396
agent-id: 1*******2
397+
cache:
398+
type: redis
399+
prefix: 'SOCIAL::STATE::'
400+
timeout: 1h
389401
```
390402
391403
### 2.3. OauthController.java
@@ -460,7 +472,7 @@ public class OauthController {
460472
461473
### 2.4. 如果想要自定义 state 缓存
462474
463-
请看👉[这里](https://github.com/xkcoding/spring-boot-demo/tree/master/spring-boot-demo-social/src/main/java/com/xkcoding/social/config/justauth)
475+
请看👉[这里](https://github.com/justauth/justauth-spring-boot-starter#2-%E7%BC%93%E5%AD%98%E9%85%8D%E7%BD%AE)
464476
465477
## 3. 运行方式
466478

0 commit comments

Comments
 (0)