From 80aa636348fd0d3ad62e15563c01414c4c3b2f48 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=96=AF=E7=8B=82=E7=9A=84=E7=8B=AE=E5=AD=90li?= <15040126243@163.com> Date: Fri, 17 Feb 2023 17:56:03 +0800 Subject: [PATCH] =?UTF-8?q?fix=20=E4=BF=AE=E5=A4=8D=20=E5=85=B3=E9=97=AD?= =?UTF-8?q?=E7=A7=9F=E6=88=B7=E5=AF=BC=E8=87=B4=E6=89=BE=E4=B8=8D=E5=88=B0?= =?UTF-8?q?=E9=85=8D=E7=BD=AE=E7=B1=BB=20=E6=97=A0=E6=B3=95=E5=90=AF?= =?UTF-8?q?=E5=8A=A8=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/ruoyi/common/tenant/helper/TenantHelper.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/ruoyi-common/ruoyi-common-tenant/src/main/java/com/ruoyi/common/tenant/helper/TenantHelper.java b/ruoyi-common/ruoyi-common-tenant/src/main/java/com/ruoyi/common/tenant/helper/TenantHelper.java index f9815be9..a436b603 100644 --- a/ruoyi-common/ruoyi-common-tenant/src/main/java/com/ruoyi/common/tenant/helper/TenantHelper.java +++ b/ruoyi-common/ruoyi-common-tenant/src/main/java/com/ruoyi/common/tenant/helper/TenantHelper.java @@ -2,6 +2,7 @@ package com.ruoyi.common.tenant.helper; import cn.dev33.satoken.context.SaHolder; import cn.dev33.satoken.spring.SpringMVCUtil; +import cn.hutool.core.convert.Convert; import com.alibaba.ttl.TransmittableThreadLocal; import com.baomidou.mybatisplus.core.plugins.IgnoreStrategy; import com.baomidou.mybatisplus.core.plugins.InterceptorIgnoreHelper; @@ -10,7 +11,6 @@ import com.ruoyi.common.core.utils.SpringUtils; import com.ruoyi.common.core.utils.StringUtils; import com.ruoyi.common.redis.utils.RedisUtils; import com.ruoyi.common.satoken.utils.LoginHelper; -import com.ruoyi.common.tenant.properties.TenantProperties; import lombok.AccessLevel; import lombok.NoArgsConstructor; import lombok.extern.slf4j.Slf4j; @@ -24,8 +24,6 @@ import lombok.extern.slf4j.Slf4j; @NoArgsConstructor(access = AccessLevel.PRIVATE) public class TenantHelper { - private static final TenantProperties PROPERTIES = SpringUtils.getBean(TenantProperties.class); - private static final String DYNAMIC_TENANT_KEY = GlobalConstants.GLOBAL_REDIS_KEY + "dynamicTenant"; private static final ThreadLocal TEMP_DYNAMIC_TENANT = new TransmittableThreadLocal<>(); @@ -34,7 +32,7 @@ public class TenantHelper { * 租户功能是否启用 */ public static boolean isEnable() { - return PROPERTIES.getEnable(); + return Convert.toBool(SpringUtils.getProperty("tenant.enable"), false); } /**