Commit a1a01cd1175370e09791231c963fa2ede4747d62

Authored by YunaiV
1 parent 47753467

fix swagger 的基础扫描路径不正确

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; @@ -22,6 +22,8 @@ import springfox.documentation.swagger2.annotations.EnableSwagger2;
22 import java.util.Collections; 22 import java.util.Collections;
23 import java.util.List; 23 import java.util.List;
24 24
  25 +import static springfox.documentation.builders.RequestHandlerSelectors.basePackage;
  26 +
25 /** 27 /**
26 * Swagger2 自动配置类 28 * Swagger2 自动配置类
27 * 29 *
@@ -56,7 +58,7 @@ public class YudaoSwaggerAutoConfiguration { @@ -56,7 +58,7 @@ public class YudaoSwaggerAutoConfiguration {
56 .apiInfo(apiInfo(properties)) 58 .apiInfo(apiInfo(properties))
57 // 设置扫描指定 package 包下的 59 // 设置扫描指定 package 包下的
58 .select() 60 .select()
59 -// .apis(basePackage(properties.getBasePackage())) 61 + .apis(basePackage(properties.getBasePackage()))
60 // .apis(basePackage("cn.iocoder.yudao.module.system")) // 可用于 swagger 无法展示时使用 62 // .apis(basePackage("cn.iocoder.yudao.module.system")) // 可用于 swagger 无法展示时使用
61 .paths(PathSelectors.any()) 63 .paths(PathSelectors.any())
62 .build() 64 .build()