mirror of
https://gitee.com/dromara/sa-token.git
synced 2026-02-27 16:50:24 +08:00
v1.41.0 update
This commit is contained in:
@@ -72,12 +72,12 @@ public class SaTokenPluginHolder {
|
||||
* </p>
|
||||
*/
|
||||
public synchronized void loaderPlugins() {
|
||||
SaManager.getLog().info("SPI 插件加载开始 ...");
|
||||
SaManager.getLog().info("SPI plugin loading start ...");
|
||||
List<SaTokenPlugin> plugins = _loaderPluginsBySpi(SaTokenPlugin.class, spiDir);
|
||||
for (SaTokenPlugin plugin : plugins) {
|
||||
installPlugin(plugin);
|
||||
}
|
||||
SaManager.getLog().info("SPI 插件加载结束 ...");
|
||||
SaManager.getLog().info("SPI plugin loading end ...");
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -112,7 +112,7 @@ public class SaTokenPluginHolder {
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException("SPI 插件加载失败: " + e.getMessage(), e);
|
||||
throw new SaTokenPluginException("SPI 插件加载失败: " + e.getMessage(), e);
|
||||
}
|
||||
return providers;
|
||||
}
|
||||
|
||||
@@ -525,7 +525,7 @@ public class StpLogic {
|
||||
// 如果配置为:不允许一个账号多地同时登录,则需要先将这个账号的历史登录会话标记为:被顶下线
|
||||
if( ! loginParameter.getIsConcurrent()) {
|
||||
if(loginParameter.getReplacedRange() == SaReplacedRange.CURR_DEVICE_TYPE) {
|
||||
replaced(id, loginParameter.getDeviceTypeOrDefault());
|
||||
replaced(id, loginParameter.getDeviceType());
|
||||
}
|
||||
if(loginParameter.getReplacedRange() == SaReplacedRange.ALL_DEVICE_TYPE) {
|
||||
replaced(id, createSaLogoutParameter());
|
||||
|
||||
@@ -231,16 +231,6 @@ public class SaLoginParameter {
|
||||
return (int)_timeout;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return 获取device参数,如果为null,则返回默认值
|
||||
*/
|
||||
public String getDeviceTypeOrDefault() {
|
||||
if(deviceType == null) {
|
||||
return SaTokenConsts.DEFAULT_LOGIN_DEVICE_TYPE;
|
||||
}
|
||||
return deviceType;
|
||||
}
|
||||
|
||||
/**
|
||||
* 静态方法获取一个 SaLoginParameter 对象
|
||||
* @return SaLoginParameter 对象
|
||||
|
||||
@@ -36,7 +36,7 @@ public class SaTokenConsts {
|
||||
/**
|
||||
* Sa-Token 当前版本号
|
||||
*/
|
||||
public static final String VERSION_NO = "v1.40.0";
|
||||
public static final String VERSION_NO = "v1.41.0";
|
||||
|
||||
/**
|
||||
* Sa-Token 开源地址 Gitee
|
||||
|
||||
Reference in New Issue
Block a user