提交 edb73343 authored 作者: lvwei's avatar lvwei

--no commit message

上级 ec7788a3
......@@ -41,16 +41,16 @@ import springfox.documentation.swagger2.annotations.EnableSwagger2;
@Configuration
public class Swagger2Config {
// @Bean
// public Docket createRestApi() {
// return new Docket(DocumentationType.SWAGGER_2)
// .apiInfo(apiInfo())
// .select()
// //为当前包路径
// .apis(RequestHandlerSelectors.basePackage("com.zrqx.file.controller"))
// .paths(PathSelectors.any())
// .build();
// }
@Bean
public Docket createRestApi() {
return new Docket(DocumentationType.SWAGGER_2)
.apiInfo(apiInfo())
.select()
//为当前包路径
.apis(RequestHandlerSelectors.basePackage("com.zrqx.file.controller"))
.paths(PathSelectors.any())
.build();
}
//构建 api文档的详细信息函数
private ApiInfo apiInfo() {
return new ApiInfoBuilder()
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论