From a1a01cd1175370e09791231c963fa2ede4747d62 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Fri, 3 Jun 2022 16:53:53 +0800 Subject: [PATCH] =?UTF-8?q?fix=20swagger=20=E7=9A=84=E5=9F=BA=E7=A1=80?= =?UTF-8?q?=E6=89=AB=E6=8F=8F=E8=B7=AF=E5=BE=84=E4=B8=8D=E6=AD=A3=E7=A1=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../swagger/config/YudaoSwaggerAutoConfiguration.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/swagger/config/YudaoSwaggerAutoConfiguration.java b/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/swagger/config/YudaoSwaggerAutoConfiguration.java index 514ed738a..8b0815b73 100644 --- a/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/swagger/config/YudaoSwaggerAutoConfiguration.java +++ b/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/swagger/config/YudaoSwaggerAutoConfiguration.java @@ -22,6 +22,8 @@ import springfox.documentation.swagger2.annotations.EnableSwagger2; import java.util.Collections; import java.util.List; +import static springfox.documentation.builders.RequestHandlerSelectors.basePackage; + /** * Swagger2 自动配置类 * @@ -56,7 +58,7 @@ public class YudaoSwaggerAutoConfiguration { .apiInfo(apiInfo(properties)) // 设置扫描指定 package 包下的 .select() -// .apis(basePackage(properties.getBasePackage())) + .apis(basePackage(properties.getBasePackage())) // .apis(basePackage("cn.iocoder.yudao.module.system")) // 可用于 swagger 无法展示时使用 .paths(PathSelectors.any()) .build()