Commit f37eb400 by 陈皓

init

parent fec235bb
......@@ -7,8 +7,6 @@ import org.springframework.web.servlet.config.annotation.EnableWebMvc;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
import springfox.documentation.builders.ApiInfoBuilder;
import springfox.documentation.builders.PathSelectors;
import springfox.documentation.builders.RequestHandlerSelectors;
import springfox.documentation.service.ApiInfo;
import springfox.documentation.spi.DocumentationType;
import springfox.documentation.spring.web.plugins.Docket;
......@@ -45,15 +43,15 @@ public class SwaggerConfig implements WebMvcConfigurer {
@Bean
public Docket api() {
return new Docket(DocumentationType.SWAGGER_2)
.groupName("项目")
// 生产环境关闭
.enable(!"product".equals(profile))
.select()
.apis(RequestHandlerSelectors.basePackage("com.zq.imgproc.controller"))
.paths(PathSelectors.any())
.build()
.apiInfo(apiInfo());
return new Docket(DocumentationType.SWAGGER_2).enable(false);
// .groupName("项目")
// // 生产环境关闭
// .enable(!"product".equals(profile))
// .select()
// .apis(RequestHandlerSelectors.basePackage("com.zq.imgproc.controller"))
// .paths(PathSelectors.any())
// .build()
// .apiInfo(apiInfo());
}
private ApiInfo apiInfo() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment