From 1297d094cb5ee7305d151cd8b4a8a5659275ae97 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B7=A1=E7=84=B6=E9=80=9D=E5=8E=BB?= Date: Thu, 16 Jun 2022 04:56:12 +0000 Subject: [PATCH] =?UTF-8?q?=E4=BD=BF=E7=94=A8=20@Lazy=EF=BC=8C@AutoConfigu?= =?UTF-8?q?reBefore=E6=B3=A8=E8=A7=A3=E8=A7=A3=E5=86=B3=E5=BE=AA=E7=8E=AF?= =?UTF-8?q?=E5=BC=95=E7=94=A8=E5=8F=8ABean=E9=87=8D=E5=A4=8D=E9=97=AE?= =?UTF-8?q?=E9=A2=98=EF=BC=8C=E5=88=A0=E9=99=A4allow-bean-definition-overr?= =?UTF-8?q?iding:=20true=EF=BC=8C=20allow-circular-references:=20true?= =?UTF-8?q?=E9=85=8D=E7=BD=AE=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/ruoyi/common/redis/configure/RedisConfig.java | 1 + .../main/java/com/ruoyi/gateway/config/SwaggerProvider.java | 1 + ruoyi-gateway/src/main/resources/bootstrap.yml | 3 --- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/ruoyi-common/ruoyi-common-redis/src/main/java/com/ruoyi/common/redis/configure/RedisConfig.java b/ruoyi-common/ruoyi-common-redis/src/main/java/com/ruoyi/common/redis/configure/RedisConfig.java index e0b96beed..793f6df92 100644 --- a/ruoyi-common/ruoyi-common-redis/src/main/java/com/ruoyi/common/redis/configure/RedisConfig.java +++ b/ruoyi-common/ruoyi-common-redis/src/main/java/com/ruoyi/common/redis/configure/RedisConfig.java @@ -15,6 +15,7 @@ import org.springframework.data.redis.serializer.StringRedisSerializer; */ @Configuration @EnableCaching +@AutoConfigureBefore(RedisAutoConfiguration.class) public class RedisConfig extends CachingConfigurerSupport { @Bean diff --git a/ruoyi-gateway/src/main/java/com/ruoyi/gateway/config/SwaggerProvider.java b/ruoyi-gateway/src/main/java/com/ruoyi/gateway/config/SwaggerProvider.java index 67f18b7dd..81b8c3148 100644 --- a/ruoyi-gateway/src/main/java/com/ruoyi/gateway/config/SwaggerProvider.java +++ b/ruoyi-gateway/src/main/java/com/ruoyi/gateway/config/SwaggerProvider.java @@ -27,6 +27,7 @@ public class SwaggerProvider implements SwaggerResourcesProvider, WebFluxConfigu /** * 网关路由 */ + @Lazy @Autowired private RouteLocator routeLocator; diff --git a/ruoyi-gateway/src/main/resources/bootstrap.yml b/ruoyi-gateway/src/main/resources/bootstrap.yml index 51502b55a..5a955b4cd 100644 --- a/ruoyi-gateway/src/main/resources/bootstrap.yml +++ b/ruoyi-gateway/src/main/resources/bootstrap.yml @@ -10,9 +10,6 @@ spring: profiles: # 环境配置 active: dev - main: - allow-circular-references: true - allow-bean-definition-overriding: true cloud: nacos: discovery: