1. 升级 spring boot 2.7.6
2. 升级 spring cloud 2021.0.5 3. 升级 spring cloud alibaba 2021.0.4.0 4. 解决新版本 Srping Cloud Gateway 重复 cors 导致报错 5. 调整 spring boot 自动配置的写法 6. 调整 spring security 配置的写法
This commit is contained in:
@@ -20,6 +20,7 @@ import com.baomidou.mybatisplus.extension.plugins.inner.TenantLineInnerIntercept
|
||||
import com.xxl.job.core.executor.XxlJobExecutor;
|
||||
import org.springframework.beans.BeansException;
|
||||
import org.springframework.beans.factory.config.BeanPostProcessor;
|
||||
import org.springframework.boot.autoconfigure.AutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
||||
import org.springframework.boot.context.properties.EnableConfigurationProperties;
|
||||
import org.springframework.boot.web.servlet.FilterRegistrationBean;
|
||||
@@ -36,7 +37,7 @@ import org.springframework.integration.config.GlobalChannelInterceptor;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
@AutoConfiguration
|
||||
@ConditionalOnProperty(prefix = "yudao.tenant", value = "enable", matchIfMissing = true) // 允许使用 yudao.tenant.enable=false 禁用多租户
|
||||
@EnableConfigurationProperties(TenantProperties.class)
|
||||
public class YudaoTenantAutoConfiguration {
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
package cn.iocoder.yudao.framework.tenant.config;
|
||||
|
||||
import cn.iocoder.yudao.framework.tenant.core.rpc.TenantRequestInterceptor;
|
||||
import cn.iocoder.yudao.module.system.api.logger.OperateLogApi;
|
||||
import cn.iocoder.yudao.module.system.api.tenant.TenantApi;
|
||||
import org.springframework.boot.autoconfigure.AutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
||||
import org.springframework.cloud.openfeign.EnableFeignClients;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
@AutoConfiguration
|
||||
@ConditionalOnProperty(prefix = "yudao.tenant", value = "enable", matchIfMissing = true) // 允许使用 yudao.tenant.enable=false 禁用多租户
|
||||
@EnableFeignClients(clients = TenantApi.class) // 主要是引入相关的 API 服务
|
||||
public class YudaoTenantRpcAutoConfiguration {
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
|
||||
cn.iocoder.yudao.framework.tenant.config.YudaoTenantRpcAutoConfiguration,\
|
||||
cn.iocoder.yudao.framework.tenant.config.YudaoTenantAutoConfiguration
|
||||
@@ -0,0 +1,2 @@
|
||||
cn.iocoder.yudao.framework.tenant.config.YudaoTenantRpcAutoConfiguration
|
||||
cn.iocoder.yudao.framework.tenant.config.YudaoTenantAutoConfiguration
|
||||
Reference in New Issue
Block a user