sa-token-demo-sso-server-solon::根据 sa-token-solon-plugin 最新的适配代码,调整示例

This commit is contained in:
noear 2023-01-29 18:21:47 +08:00
parent f1fd2f1ca5
commit efa8523a20
3 changed files with 6 additions and 17 deletions

View File

@ -6,17 +6,10 @@
<artifactId>sa-token-demo-sso-server-solon</artifactId>
<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 版本号 -->
<properties>
<sa-token.version>1.34.0</sa-token.version>
<solon.version>1.12.4</solon.version>
</properties>
<dependencies>
@ -25,6 +18,7 @@
<dependency>
<groupId>org.noear</groupId>
<artifactId>solon-web</artifactId>
<version>${solon.version}</version>
</dependency>
<!-- Sa-Token 权限认证, 在线文档https://sa-token.cc/ -->
@ -52,12 +46,14 @@
<dependency>
<groupId>org.noear</groupId>
<artifactId>solon.view.thymeleaf</artifactId>
<version>${solon.version}</version>
</dependency>
<!-- Http请求工具在模式三的单点注销功能下用到如不需要可以注释掉 -->
<dependency>
<groupId>org.noear</groupId>
<artifactId>forest-solon-plugin</artifactId>
<version>${solon.version}</version>
</dependency>

View File

@ -16,13 +16,6 @@ import org.noear.solon.core.handle.ModelAndView;
*/
@Configuration
public class SsoConfig {
/**
* 构建 SaSsoConfig bean
* */
@Bean
public SaSsoConfig getSaSsoConfig(@Inject("${sa-token.sso}") SaSsoConfig ssoConfig) {
return ssoConfig;
}
/**
* 构建建 SaToken redis dao如果不需要 redis可以注释掉
@ -34,7 +27,7 @@ public class SsoConfig {
// 配置SSO相关参数
@Bean
public void configSso(SaSsoConfig sso) {
public void configSso(SaSsoConfig sso) { //SaSsoConfig 已自动构建
// 配置未登录时返回的View
sso.setNotLoginView(() -> {

View File

@ -23,7 +23,7 @@
<servlet-api.version>3.1.0</servlet-api.version>
<jakarta-servlet-api.version>6.0.0</jakarta-servlet-api.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-snack3.version>3.2.50</noear-snack3.version>
<jfinal.version>4.9.17</jfinal.version>