From 0fdd97203f1f8a7f3e4df221e8d79a4f387d14d6 Mon Sep 17 00:00:00 2001 From: Yjoioooo <5403234+zj_Gitttttttte@user.noreply.gitee.com> Date: 星期一, 06 三月 2023 19:07:00 +0800 Subject: [PATCH] !296 add 新增租户套餐同步功能 * update 修改按钮简化为同步套餐 * update 修改同步租户套餐接口message错误描述 * update 修改同步租户套餐权限字符 * update 修改状态修改权限字符 * add 租户管理新增租户套餐同步功能 --- ruoyi-common/ruoyi-common-doc/src/main/java/com/ruoyi/common/doc/config/SwaggerConfig.java | 13 +++++++------ 1 files changed, 7 insertions(+), 6 deletions(-) diff --git a/ruoyi-common/ruoyi-common-doc/src/main/java/com/ruoyi/common/doc/config/SwaggerConfig.java b/ruoyi-common/ruoyi-common-doc/src/main/java/com/ruoyi/common/doc/config/SwaggerConfig.java index b783a87..564cb28 100644 --- a/ruoyi-common/ruoyi-common-doc/src/main/java/com/ruoyi/common/doc/config/SwaggerConfig.java +++ b/ruoyi-common/ruoyi-common-doc/src/main/java/com/ruoyi/common/doc/config/SwaggerConfig.java @@ -17,10 +17,11 @@ import org.springdoc.core.service.OpenAPIService; import org.springdoc.core.service.SecurityService; import org.springdoc.core.utils.PropertyResolverUtils; -import org.springframework.boot.autoconfigure.AutoConfigureBefore; +import org.springframework.boot.autoconfigure.AutoConfiguration; import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; import org.springframework.boot.autoconfigure.web.ServerProperties; +import org.springframework.boot.context.properties.EnableConfigurationProperties; import org.springframework.context.annotation.Bean; import java.util.ArrayList; @@ -34,16 +35,16 @@ * @author Lion Li */ @RequiredArgsConstructor -@AutoConfigureBefore(SpringDocConfiguration.class) -@ConditionalOnProperty(name = "swagger.enabled", havingValue = "true", matchIfMissing = true) +@AutoConfiguration(before = SpringDocConfiguration.class) +@EnableConfigurationProperties(SwaggerProperties.class) +@ConditionalOnProperty(name = "springdoc.api-docs.enabled", havingValue = "true", matchIfMissing = true) public class SwaggerConfig { - private final SwaggerProperties swaggerProperties; private final ServerProperties serverProperties; @Bean @ConditionalOnMissingBean(OpenAPI.class) - public OpenAPI openApi() { + public OpenAPI openApi(SwaggerProperties swaggerProperties) { OpenAPI openApi = new OpenAPI(); // 鏂囨。鍩烘湰淇℃伅 SwaggerProperties.InfoProperties infoProperties = swaggerProperties.getInfo(); @@ -105,7 +106,7 @@ return; } PlusPaths newPaths = new PlusPaths(); - oldPaths.forEach((k,v) -> newPaths.addPathItem(finalContextPath + k, v)); + oldPaths.forEach((k, v) -> newPaths.addPathItem(finalContextPath + k, v)); openApi.setPaths(newPaths); }; } -- Gitblit v1.9.3