增加对SpringBoot1.x版本的兼容性

This commit is contained in:
click33 2021-07-19 22:18:40 +08:00
parent c7ca8ee280
commit b5f23f2455
4 changed files with 10 additions and 0 deletions

View File

@ -11,6 +11,7 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.0.0.RELEASE</version>
<!-- <version>1.5.9.RELEASE</version> -->
<relativePath/>
</parent>

View File

@ -234,6 +234,9 @@
<a href="https://budwk.com/" target="_blank">
<img src="https://oss.dev33.cn/sa-token/com/budwk.png">
</a>
<a href="https://www.quandashi.com/" target="_blank">
<img src="https://oss.dev33.cn/sa-token/com/quandashi.png">
</a>
</div>
<div style="height: 10px; clear: both;"></div>
<p style="color: #666;">

View File

@ -3,6 +3,7 @@ package cn.dev33.satoken.reactor.spring;
import java.util.LinkedHashMap;
import java.util.Map;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.env.OriginTrackedMapPropertySource;
import org.springframework.context.EnvironmentAware;
import org.springframework.core.env.ConfigurableEnvironment;
@ -18,6 +19,8 @@ import cn.dev33.satoken.util.SaTokenConsts;
* <p> 1. yml配置前缀 [spring.sa-token.] 更改为 [sa-token.]
* @author kong
*/
//SpringBoot 1.5.x 版本下不存在 OriginTrackedMapPropertySource 不加这个注解会导致项目无法启动
@ConditionalOnClass(OriginTrackedMapPropertySource.class)
public class SaHistoryVersionInject implements EnvironmentAware{
@Override

View File

@ -3,6 +3,7 @@ package cn.dev33.satoken.spring;
import java.util.LinkedHashMap;
import java.util.Map;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.env.OriginTrackedMapPropertySource;
import org.springframework.context.EnvironmentAware;
import org.springframework.core.env.ConfigurableEnvironment;
@ -18,6 +19,8 @@ import cn.dev33.satoken.util.SaTokenConsts;
* <p> 1. yml配置前缀 [spring.sa-token.] 更改为 [sa-token.]
* @author kong
*/
//SpringBoot 1.5.x 版本下不存在 OriginTrackedMapPropertySource 不加这个注解会导致项目无法启动
@ConditionalOnClass(OriginTrackedMapPropertySource.class)
public class SaHistoryVersionInject implements EnvironmentAware{
@Override