Pre Merge pull request !366 from 刘继东/N/A

pull/366/MERGE
刘继东 2024-07-09 04:13:26 +00:00 committed by Gitee
commit 3b531c5d67
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
1 changed files with 2 additions and 1 deletions

View File

@ -61,7 +61,8 @@ public class SwaggerAutoConfiguration
ApiSelectorBuilder builder = new Docket(DocumentationType.SWAGGER_2).host(swaggerProperties.getHost())
.apiInfo(apiInfo(swaggerProperties)).select()
.apis(RequestHandlerSelectors.basePackage(swaggerProperties.getBasePackage()));
.apis(RequestHandlerSelectors.basePackage(swaggerProperties.getBasePackage())
.and(RequestHandlerSelectors.withMethodAnnotation(ApiOperation.class)));
swaggerProperties.getBasePath().forEach(p -> builder.paths(PathSelectors.ant(p)));
swaggerProperties.getExcludePath().forEach(p -> builder.paths(PathSelectors.ant(p).negate()));