Selaa lähdekoodia

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

若依 3 vuotta sitten
vanhempi
commit
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
 @Configuration
16
 @Configuration
17
 @EnableCaching
17
 @EnableCaching
18
+@AutoConfigureBefore(RedisAutoConfiguration.class)
18
 public class RedisConfig extends CachingConfigurerSupport
19
 public class RedisConfig extends CachingConfigurerSupport
19
 {
20
 {
20
     @Bean
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
     @Autowired
31
     @Autowired
31
     private RouteLocator routeLocator;
32
     private RouteLocator routeLocator;
32
 
33
 

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

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