mirror of
https://gitee.com/dromara/RuoYi-Cloud-Plus.git
synced 2025-10-14 22:20:29 +00:00
fix 修复 gateway 不存在 mp 依赖导致方法报错问题
This commit is contained in:
@@ -4,7 +4,6 @@ import cn.dev33.satoken.dao.SaTokenDao;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.baomidou.mybatisplus.extension.plugins.inner.TenantLineInnerInterceptor;
|
||||
import org.dromara.common.core.utils.reflect.ReflectUtils;
|
||||
import org.dromara.common.mybatis.config.MybatisPlusConfiguration;
|
||||
import org.dromara.common.redis.config.RedisConfiguration;
|
||||
import org.dromara.common.redis.config.properties.RedissonProperties;
|
||||
import org.dromara.common.tenant.core.TenantSaTokenDao;
|
||||
@@ -16,7 +15,6 @@ import org.redisson.config.ClusterServersConfig;
|
||||
import org.redisson.config.SingleServerConfig;
|
||||
import org.redisson.spring.starter.RedissonAutoConfigurationCustomizer;
|
||||
import org.springframework.boot.autoconfigure.AutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
||||
import org.springframework.boot.context.properties.EnableConfigurationProperties;
|
||||
|
@@ -27,8 +27,12 @@ public class TenantKeyPrefixHandler extends KeyPrefixHandler {
|
||||
if (StringUtils.isBlank(name)) {
|
||||
return null;
|
||||
}
|
||||
if (InterceptorIgnoreHelper.willIgnoreTenantLine("")) {
|
||||
return super.map(name);
|
||||
try {
|
||||
if (InterceptorIgnoreHelper.willIgnoreTenantLine("")) {
|
||||
return super.map(name);
|
||||
}
|
||||
} catch (NoClassDefFoundError ignore) {
|
||||
// 有些服务不需要mp导致类不存在 忽略即可
|
||||
}
|
||||
if (StringUtils.contains(name, GlobalConstants.GLOBAL_REDIS_KEY)) {
|
||||
return super.map(name);
|
||||
@@ -54,8 +58,12 @@ public class TenantKeyPrefixHandler extends KeyPrefixHandler {
|
||||
if (StringUtils.isBlank(unmap)) {
|
||||
return null;
|
||||
}
|
||||
if (InterceptorIgnoreHelper.willIgnoreTenantLine("")) {
|
||||
return super.unmap(name);
|
||||
try {
|
||||
if (InterceptorIgnoreHelper.willIgnoreTenantLine("")) {
|
||||
return super.unmap(name);
|
||||
}
|
||||
} catch (NoClassDefFoundError ignore) {
|
||||
// 有些服务不需要mp导致类不存在 忽略即可
|
||||
}
|
||||
if (StringUtils.contains(name, GlobalConstants.GLOBAL_REDIS_KEY)) {
|
||||
return super.unmap(name);
|
||||
|
@@ -92,12 +92,6 @@
|
||||
<dependency>
|
||||
<groupId>org.dromara</groupId>
|
||||
<artifactId>ruoyi-common-tenant</artifactId>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>org.dromara</groupId>
|
||||
<artifactId>ruoyi-common-mybatis</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
|
||||
<!-- 自定义负载均衡(多团队开发使用) -->
|
||||
|
Reference in New Issue
Block a user