mirror of
https://gitee.com/dromara/sa-token.git
synced 2025-06-28 13:34:18 +08:00
sa-token-demo-sso-server-solon::根据 sa-token-solon-plugin 最新的适配代码,调整示例
This commit is contained in:
parent
f1fd2f1ca5
commit
efa8523a20
@ -6,17 +6,10 @@
|
|||||||
<artifactId>sa-token-demo-sso-server-solon</artifactId>
|
<artifactId>sa-token-demo-sso-server-solon</artifactId>
|
||||||
<version>0.0.1-SNAPSHOT</version>
|
<version>0.0.1-SNAPSHOT</version>
|
||||||
|
|
||||||
<!-- SpringBoot -->
|
|
||||||
<parent>
|
|
||||||
<groupId>org.noear</groupId>
|
|
||||||
<artifactId>solon-parent</artifactId>
|
|
||||||
<version>1.12.0</version>
|
|
||||||
<relativePath/>
|
|
||||||
</parent>
|
|
||||||
|
|
||||||
<!-- 定义 Sa-Token 版本号 -->
|
<!-- 定义 Sa-Token 版本号 -->
|
||||||
<properties>
|
<properties>
|
||||||
<sa-token.version>1.34.0</sa-token.version>
|
<sa-token.version>1.34.0</sa-token.version>
|
||||||
|
<solon.version>1.12.4</solon.version>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
@ -25,6 +18,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.noear</groupId>
|
<groupId>org.noear</groupId>
|
||||||
<artifactId>solon-web</artifactId>
|
<artifactId>solon-web</artifactId>
|
||||||
|
<version>${solon.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- Sa-Token 权限认证, 在线文档:https://sa-token.cc/ -->
|
<!-- Sa-Token 权限认证, 在线文档:https://sa-token.cc/ -->
|
||||||
@ -52,12 +46,14 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.noear</groupId>
|
<groupId>org.noear</groupId>
|
||||||
<artifactId>solon.view.thymeleaf</artifactId>
|
<artifactId>solon.view.thymeleaf</artifactId>
|
||||||
|
<version>${solon.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- Http请求工具(在模式三的单点注销功能下用到,如不需要可以注释掉) -->
|
<!-- Http请求工具(在模式三的单点注销功能下用到,如不需要可以注释掉) -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.noear</groupId>
|
<groupId>org.noear</groupId>
|
||||||
<artifactId>forest-solon-plugin</artifactId>
|
<artifactId>forest-solon-plugin</artifactId>
|
||||||
|
<version>${solon.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
|
||||||
|
@ -16,13 +16,6 @@ import org.noear.solon.core.handle.ModelAndView;
|
|||||||
*/
|
*/
|
||||||
@Configuration
|
@Configuration
|
||||||
public class SsoConfig {
|
public class SsoConfig {
|
||||||
/**
|
|
||||||
* 构建 SaSsoConfig bean
|
|
||||||
* */
|
|
||||||
@Bean
|
|
||||||
public SaSsoConfig getSaSsoConfig(@Inject("${sa-token.sso}") SaSsoConfig ssoConfig) {
|
|
||||||
return ssoConfig;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 构建建 SaToken redis dao(如果不需要 redis;可以注释掉)
|
* 构建建 SaToken redis dao(如果不需要 redis;可以注释掉)
|
||||||
@ -34,7 +27,7 @@ public class SsoConfig {
|
|||||||
|
|
||||||
// 配置SSO相关参数
|
// 配置SSO相关参数
|
||||||
@Bean
|
@Bean
|
||||||
public void configSso(SaSsoConfig sso) {
|
public void configSso(SaSsoConfig sso) { //SaSsoConfig 已自动构建
|
||||||
|
|
||||||
// 配置:未登录时返回的View
|
// 配置:未登录时返回的View
|
||||||
sso.setNotLoginView(() -> {
|
sso.setNotLoginView(() -> {
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
<servlet-api.version>3.1.0</servlet-api.version>
|
<servlet-api.version>3.1.0</servlet-api.version>
|
||||||
<jakarta-servlet-api.version>6.0.0</jakarta-servlet-api.version>
|
<jakarta-servlet-api.version>6.0.0</jakarta-servlet-api.version>
|
||||||
<thymeleaf.version>3.0.9.RELEASE</thymeleaf.version>
|
<thymeleaf.version>3.0.9.RELEASE</thymeleaf.version>
|
||||||
<solon.version>1.12.2</solon.version>
|
<solon.version>1.12.4</solon.version>
|
||||||
<noear-redisx.version>1.4.5</noear-redisx.version>
|
<noear-redisx.version>1.4.5</noear-redisx.version>
|
||||||
<noear-snack3.version>3.2.50</noear-snack3.version>
|
<noear-snack3.version>3.2.50</noear-snack3.version>
|
||||||
<jfinal.version>4.9.17</jfinal.version>
|
<jfinal.version>4.9.17</jfinal.version>
|
||||||
|
Loading…
Reference in New Issue
Block a user