Swagger UI默认显示所有接口,连endpoint,jpa restful等接口也会显示
可以通过一下配置:
@Configuration
@EnableSwagger2
public class SwaggerConfig {
@Bean
public Docket api(){
return new Docket(DocumentationType.SWAGGER_2)
.select()
.apis(("包名"))
.paths(())
.build();
}
}
配置上你controller的包路径,就会只显示你包下面的接口