pref: 简化SpringBootVersionCompatibilityChecker代码

This commit is contained in:
Uncarbon
2023-11-10 14:21:40 +08:00
parent 8f75dd067c
commit 49e51a2114
2 changed files with 4 additions and 14 deletions

View File

@@ -7,14 +7,9 @@ public class SpringBootVersionCompatibilityChecker {
public SpringBootVersionCompatibilityChecker() {
String version = SpringBootVersion.getVersion();
if (SaFoxUtil.isEmpty(version)) {
if (SaFoxUtil.isEmpty(version) || version.startsWith("1.") || version.startsWith("2.")) {
return;
}
if (version.startsWith("1.") || version.startsWith("2.")) {
return;
}
BootstrapMethodError error = new BootstrapMethodError("当前Spring-Boot版本为" + version + "请尝试改用sa-token-reactor-spring-boot3-starter");
error.fillInStackTrace();
throw error;
throw new BootstrapMethodError("当前Spring-Boot版本为" + version + "请尝试改用sa-token-reactor-spring-boot3-starter");
}
}