Pārlūkot izejas kodu

fix 修复 接口问题开关不生效问题

疯狂的狮子Li 2 gadi atpakaļ
vecāks
revīzija
6c6d92a776

+ 3 - 2
ruoyi-admin/src/main/resources/application.yml

@@ -196,8 +196,6 @@ mybatis-encryptor:
 
 # Swagger配置
 swagger:
-  # 是否开启swagger
-  enabled: true
   info:
     # 标题
     title: '标题:${ruoyi.name}后台管理系统_接口文档'
@@ -219,6 +217,9 @@ swagger:
         name: ${sa-token.token-name}
 
 springdoc:
+  api-docs:
+    # 是否开启接口文档
+    enabled: true
   swagger-ui:
     # 持久化认证数据
     persistAuthorization: true

+ 1 - 1
ruoyi-framework/src/main/java/com/ruoyi/framework/config/SwaggerConfig.java

@@ -33,7 +33,7 @@ import java.util.Set;
 @RequiredArgsConstructor
 @Configuration
 @AutoConfigureBefore(SpringDocConfiguration.class)
-@ConditionalOnProperty(name = "swagger.enabled", havingValue = "true", matchIfMissing = true)
+@ConditionalOnProperty(name = "springdoc.api-docs.enabled", havingValue = "true", matchIfMissing = true)
 public class SwaggerConfig {
 
     private final SwaggerProperties swaggerProperties;

+ 0 - 5
ruoyi-framework/src/main/java/com/ruoyi/framework/config/properties/SwaggerProperties.java

@@ -24,11 +24,6 @@ import java.util.List;
 public class SwaggerProperties {
 
     /**
-     * 是否开启 openApi 文档
-     */
-    private Boolean enabled = true;
-
-    /**
      * 文档基本信息
      */
     @NestedConfigurationProperty