修改SwaggerConfig

This commit is contained in:
keivn 2021-12-07 22:20:21 +08:00
parent a9ae1f4f81
commit 009beeb89c

View File

@ -56,10 +56,11 @@ public class SwaggerConfig
// 设置哪些接口暴露给Swagger展示
.select()
// 扫描所有有注解的api用这种方式更灵活
.apis(RequestHandlerSelectors.withMethodAnnotation(ApiOperation.class))
// .apis(RequestHandlerSelectors.withMethodAnnotation(ApiOperation.class))
// 扫描指定包中的swagger注解
// .apis(RequestHandlerSelectors.basePackage("com.ruoyi.project.tool.swagger"))
// 扫描所有 .apis(RequestHandlerSelectors.any())
.apis(RequestHandlerSelectors.basePackage("com.ruoyi.carpool"))
// 扫描所有
// .apis(RequestHandlerSelectors.any())
.paths(PathSelectors.any())
.build()
/* 设置安全模式swagger可以设置访问token */