fanxw 1 年之前
父節點
當前提交
1960e9d027
共有 2 個文件被更改,包括 2 次插入5 次删除
  1. 1 2
      src/main/java/com/chinaitop/depot/config/SwaggerConfig.java
  2. 1 3
      src/main/resources/bootstrap.yml

+ 1 - 2
src/main/java/com/chinaitop/depot/config/SwaggerConfig.java

@@ -15,11 +15,10 @@ import springfox.documentation.swagger2.annotations.EnableSwagger2;
15 15
 
16 16
 @Configuration("DepotGrainTemperatureSwaggerConfig")
17 17
 @EnableSwagger2
18
-@ConditionalOnProperty(name = "swagger.enable", havingValue = "true")
19 18
 public class SwaggerConfig {
20 19
 
21 20
     //是否开启swagger,正式环境一般是需要关闭的,可根据springboot的多环境配置进行设置
22
-    @Value(value = "${swagger.enabled}")
21
+    @Value(value = "${swagger.enable}")
23 22
     Boolean swaggerEnabled;
24 23
 
25 24
     @Bean

+ 1 - 3
src/main/resources/bootstrap.yml

@@ -61,9 +61,7 @@ spring:
61 61
     multipart:
62 62
       max-file-size: 20MB
63 63
       max-request-size: 20MB
64
-# 设置是否开放swagger API接口
65
-swagger:
66
-  enabled: true
64
+
67 65
 # 配置控制台打印sql 测试用
68 66
 #logging:
69 67
 #    level: