Просмотр исходного кода

使用Lazy,AutoConfigureBefore注解解决循环引用及Bean重复问题
Merge pull request !205 from 淡然逝去/N/A

若依 лет назад: 3
Родитель
Сommit
b622675522

+ 1 - 0
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;
15 15
  */
16 16
 @Configuration
17 17
 @EnableCaching
18
+@AutoConfigureBefore(RedisAutoConfiguration.class)
18 19
 public class RedisConfig extends CachingConfigurerSupport
19 20
 {
20 21
     @Bean

+ 1 - 0
ruoyi-gateway/src/main/java/com/ruoyi/gateway/config/SwaggerProvider.java

@@ -27,6 +27,7 @@ public class SwaggerProvider implements SwaggerResourcesProvider, WebFluxConfigu
27 27
     /**
28 28
      * 网关路由
29 29
      */
30
+    @Lazy
30 31
     @Autowired
31 32
     private RouteLocator routeLocator;
32 33
 

+ 0 - 3
ruoyi-gateway/src/main/resources/bootstrap.yml

@@ -10,9 +10,6 @@ spring:
10 10
   profiles:
11 11
     # 环境配置
12 12
     active: dev
13
-  main:
14
-    allow-circular-references: true
15
-    allow-bean-definition-overriding: true
16 13
   cloud:
17 14
     nacos:
18 15
       discovery: