From 226f1ae89a46411824e8c7065541f0d3bf9ca58f Mon Sep 17 00:00:00 2001 From: zlyx <1242874891@qq.com> Date: 星期一, 30 一月 2023 22:07:30 +0800 Subject: [PATCH] update 更新 SysUserResult, 返回 deptId 便于 SysLoginService#buildLoginUser 获取 ; --- ruoyi-common/ruoyi-common-doc/src/main/java/com/ruoyi/common/doc/config/SwaggerConfig.java | 5 +++-- 1 files changed, 3 insertions(+), 2 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 ec3f776..6a7dbc0 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 @@ -21,6 +21,7 @@ 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; @@ -35,15 +36,15 @@ */ @RequiredArgsConstructor @AutoConfiguration(before = SpringDocConfiguration.class) +@EnableConfigurationProperties(SwaggerProperties.class) @ConditionalOnProperty(name = "swagger.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(); -- Gitblit v1.9.3