mirror of
https://gitee.com/dromara/sa-token.git
synced 2025-06-28 04:35:16 +08:00
refactor: 调整 solon sso 示例代码
This commit is contained in:
parent
bb1702da0b
commit
9dc6ade2cf
@ -51,6 +51,13 @@
|
|||||||
<version>${sa-token.version}</version>
|
<version>${sa-token.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<!-- sa-token json 序列化器组件:snack3 实现 -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>cn.dev33</groupId>
|
||||||
|
<artifactId>sa-token-snack3</artifactId>
|
||||||
|
<version>${sa-token.version}</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
<!-- hutool工具类,用来生成雪花算法唯一id -->
|
<!-- hutool工具类,用来生成雪花算法唯一id -->
|
||||||
<!-- <dependency>
|
<!-- <dependency>
|
||||||
<groupId>cn.hutool</groupId>
|
<groupId>cn.hutool</groupId>
|
||||||
|
@ -2,14 +2,9 @@ package com.pj;
|
|||||||
|
|
||||||
|
|
||||||
import cn.dev33.satoken.sso.SaSsoManager;
|
import cn.dev33.satoken.sso.SaSsoManager;
|
||||||
import cn.dev33.satoken.sso.model.SaSsoClientInfo;
|
|
||||||
import cn.dev33.satoken.stp.StpUtil;
|
|
||||||
import org.noear.solon.Solon;
|
import org.noear.solon.Solon;
|
||||||
import org.noear.solon.annotation.SolonMain;
|
import org.noear.solon.annotation.SolonMain;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
@SolonMain
|
@SolonMain
|
||||||
public class SaSsoServerApp {
|
public class SaSsoServerApp {
|
||||||
|
|
||||||
@ -22,6 +17,13 @@ public class SaSsoServerApp {
|
|||||||
System.out.println("统一认证登录地址:http://sa-sso-server.com:9000/sso/auth");
|
System.out.println("统一认证登录地址:http://sa-sso-server.com:9000/sso/auth");
|
||||||
System.out.println("测试前需要根据官网文档修改 hosts 文件,测试账号密码:sa / 123456");
|
System.out.println("测试前需要根据官网文档修改 hosts 文件,测试账号密码:sa / 123456");
|
||||||
System.out.println();
|
System.out.println();
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 类型序列化测试代码
|
||||||
|
*
|
||||||
|
|
||||||
|
System.out.println(SaManager.getSaJsonTemplate());
|
||||||
|
|
||||||
SaSsoClientInfo sci = new SaSsoClientInfo();
|
SaSsoClientInfo sci = new SaSsoClientInfo();
|
||||||
sci.setClient("client1");
|
sci.setClient("client1");
|
||||||
@ -36,6 +38,6 @@ public class SaSsoServerApp {
|
|||||||
System.out.println(info);
|
System.out.println(info);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
*/
|
||||||
|
|
||||||
}
|
}
|
@ -47,7 +47,21 @@
|
|||||||
<artifactId>sa-token-redisx</artifactId>
|
<artifactId>sa-token-redisx</artifactId>
|
||||||
<version>${sa-token.version}</version>
|
<version>${sa-token.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<!-- Sa-Token 插件:整合snack3 (json) -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>cn.dev33</groupId>
|
||||||
|
<artifactId>sa-token-snack3</artifactId>
|
||||||
|
<version>${sa-token.version}</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- snack3 版号要 >= 3.2.133 -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.noear</groupId>
|
||||||
|
<artifactId>snack3</artifactId>
|
||||||
|
<version>3.2.133</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
|
|
||||||
|
@ -60,6 +60,20 @@
|
|||||||
<version>${sa-token.version}</version>
|
<version>${sa-token.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<!-- Sa-Token 插件:整合snack3 (json) -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>cn.dev33</groupId>
|
||||||
|
<artifactId>sa-token-snack3</artifactId>
|
||||||
|
<version>${sa-token.version}</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- snack3 版号要 >= 3.2.133 -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.noear</groupId>
|
||||||
|
<artifactId>snack3</artifactId>
|
||||||
|
<version>3.2.133</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
|
@ -55,6 +55,20 @@
|
|||||||
<version>${sa-token.version}</version>
|
<version>${sa-token.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<!-- Sa-Token 插件:整合snack3 (json) -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>cn.dev33</groupId>
|
||||||
|
<artifactId>sa-token-snack3</artifactId>
|
||||||
|
<version>${sa-token.version}</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- snack3 版号要 >= 3.2.133 -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.noear</groupId>
|
||||||
|
<artifactId>snack3</artifactId>
|
||||||
|
<version>3.2.133</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user