mirror of
https://gitee.com/dromara/sa-token.git
synced 2025-04-05 17:37:53 +08:00
增加对SpringBoot1.x版本的兼容性
This commit is contained in:
parent
c7ca8ee280
commit
b5f23f2455
@ -11,6 +11,7 @@
|
|||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
<artifactId>spring-boot-starter-parent</artifactId>
|
<artifactId>spring-boot-starter-parent</artifactId>
|
||||||
<version>2.0.0.RELEASE</version>
|
<version>2.0.0.RELEASE</version>
|
||||||
|
<!-- <version>1.5.9.RELEASE</version> -->
|
||||||
<relativePath/>
|
<relativePath/>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
@ -234,6 +234,9 @@
|
|||||||
<a href="https://budwk.com/" target="_blank">
|
<a href="https://budwk.com/" target="_blank">
|
||||||
<img src="https://oss.dev33.cn/sa-token/com/budwk.png">
|
<img src="https://oss.dev33.cn/sa-token/com/budwk.png">
|
||||||
</a>
|
</a>
|
||||||
|
<a href="https://www.quandashi.com/" target="_blank">
|
||||||
|
<img src="https://oss.dev33.cn/sa-token/com/quandashi.png">
|
||||||
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<div style="height: 10px; clear: both;"></div>
|
<div style="height: 10px; clear: both;"></div>
|
||||||
<p style="color: #666;">
|
<p style="color: #666;">
|
||||||
|
@ -3,6 +3,7 @@ package cn.dev33.satoken.reactor.spring;
|
|||||||
import java.util.LinkedHashMap;
|
import java.util.LinkedHashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
|
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
|
||||||
import org.springframework.boot.env.OriginTrackedMapPropertySource;
|
import org.springframework.boot.env.OriginTrackedMapPropertySource;
|
||||||
import org.springframework.context.EnvironmentAware;
|
import org.springframework.context.EnvironmentAware;
|
||||||
import org.springframework.core.env.ConfigurableEnvironment;
|
import org.springframework.core.env.ConfigurableEnvironment;
|
||||||
@ -18,6 +19,8 @@ import cn.dev33.satoken.util.SaTokenConsts;
|
|||||||
* <p> 1. yml配置前缀 [spring.sa-token.] 更改为 [sa-token.]
|
* <p> 1. yml配置前缀 [spring.sa-token.] 更改为 [sa-token.]
|
||||||
* @author kong
|
* @author kong
|
||||||
*/
|
*/
|
||||||
|
//SpringBoot 1.5.x 版本下不存在 OriginTrackedMapPropertySource ,不加这个注解会导致项目无法启动
|
||||||
|
@ConditionalOnClass(OriginTrackedMapPropertySource.class)
|
||||||
public class SaHistoryVersionInject implements EnvironmentAware{
|
public class SaHistoryVersionInject implements EnvironmentAware{
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -3,6 +3,7 @@ package cn.dev33.satoken.spring;
|
|||||||
import java.util.LinkedHashMap;
|
import java.util.LinkedHashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
|
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
|
||||||
import org.springframework.boot.env.OriginTrackedMapPropertySource;
|
import org.springframework.boot.env.OriginTrackedMapPropertySource;
|
||||||
import org.springframework.context.EnvironmentAware;
|
import org.springframework.context.EnvironmentAware;
|
||||||
import org.springframework.core.env.ConfigurableEnvironment;
|
import org.springframework.core.env.ConfigurableEnvironment;
|
||||||
@ -18,6 +19,8 @@ import cn.dev33.satoken.util.SaTokenConsts;
|
|||||||
* <p> 1. yml配置前缀 [spring.sa-token.] 更改为 [sa-token.]
|
* <p> 1. yml配置前缀 [spring.sa-token.] 更改为 [sa-token.]
|
||||||
* @author kong
|
* @author kong
|
||||||
*/
|
*/
|
||||||
|
//SpringBoot 1.5.x 版本下不存在 OriginTrackedMapPropertySource ,不加这个注解会导致项目无法启动
|
||||||
|
@ConditionalOnClass(OriginTrackedMapPropertySource.class)
|
||||||
public class SaHistoryVersionInject implements EnvironmentAware{
|
public class SaHistoryVersionInject implements EnvironmentAware{
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Loading…
Reference in New Issue
Block a user