mirror of
https://gitee.com/dromara/sa-token.git
synced 2025-04-05 17:37:53 +08:00
!289 feat: Spring Boot3.x错误地使用sa-token-*spring-boot-starter时,将阻断程序启动
Merge pull request !289 from Uncarbon/dev
This commit is contained in:
commit
3ce3160f05
@ -0,0 +1,15 @@
|
||||
package cn.dev33.satoken.reactor.spring;
|
||||
|
||||
import cn.dev33.satoken.util.SaFoxUtil;
|
||||
import org.springframework.boot.SpringBootVersion;
|
||||
|
||||
public class SpringBootVersionCompatibilityChecker {
|
||||
|
||||
public SpringBootVersionCompatibilityChecker() {
|
||||
String version = SpringBootVersion.getVersion();
|
||||
if (SaFoxUtil.isEmpty(version) || version.startsWith("1.") || version.startsWith("2.")) {
|
||||
return;
|
||||
}
|
||||
throw new BootstrapMethodError("当前Spring-Boot版本为" + version + ",请尝试改用:sa-token-reactor-spring-boot3-starter");
|
||||
}
|
||||
}
|
@ -0,0 +1 @@
|
||||
cn.dev33.satoken.reactor.spring.SpringBootVersionCompatibilityChecker
|
@ -0,0 +1,15 @@
|
||||
package cn.dev33.satoken.spring;
|
||||
|
||||
import cn.dev33.satoken.util.SaFoxUtil;
|
||||
import org.springframework.boot.SpringBootVersion;
|
||||
|
||||
public class SpringBootVersionCompatibilityChecker {
|
||||
|
||||
public SpringBootVersionCompatibilityChecker() {
|
||||
String version = SpringBootVersion.getVersion();
|
||||
if (SaFoxUtil.isEmpty(version) || version.startsWith("1.") || version.startsWith("2.")) {
|
||||
return;
|
||||
}
|
||||
throw new BootstrapMethodError("当前Spring-Boot版本为" + version + ",请尝试改用:sa-token-spring-boot3-starter");
|
||||
}
|
||||
}
|
@ -0,0 +1 @@
|
||||
cn.dev33.satoken.spring.SpringBootVersionCompatibilityChecker
|
Loading…
Reference in New Issue
Block a user