首页>代码>基于SpringBoot+SpringBoot Data Jpa+Mysql的自适应摄影管理系统>/Shoot/src/main/java/com/java214/config/Swagger2Configuration.java
package com.java214.config; import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import springfox.documentation.builders.ApiInfoBuilder; import springfox.documentation.builders.PathSelectors; import springfox.documentation.builders.RequestHandlerSelectors; import springfox.documentation.service.ApiInfo; import springfox.documentation.service.Contact; import springfox.documentation.spi.DocumentationType; import springfox.documentation.spring.web.plugins.Docket; import springfox.documentation.swagger2.annotations.EnableSwagger2; /*** *@author java214 *@site www.java214.com *@company 一帆风顺网络科技有限公司 *@create 2019-12-10 22:11 *swagger 配置信息 * * * */ @Configuration @ConditionalOnProperty(prefix = "swagger", value = {"enable"}, havingValue = "true") @EnableSwagger2 public class Swagger2Configuration { @Bean public Docket createRestApi() { return new Docket(DocumentationType.SWAGGER_2) .apiInfo(apiInfo()) .select() .apis(RequestHandlerSelectors.basePackage("com.java214.controller")) .paths(PathSelectors.any()) .build(); } private ApiInfo apiInfo() { return new ApiInfoBuilder() //页面标题 .title("摄影系统接口说明文档") .description("API 描述") .termsOfServiceUrl("javascript:void(0);") .contact(new Contact("Mr.Teng", "javascript:void(0);", "583859395@qq.com")) .version("1.1") .build(); } }
最近下载更多
朱朱啊哈 LV16
4月8日
wanglinddad LV55
3月13日
2781674049 LV1
3月5日
akkye_7 LV1
1月8日
lilong007 LV20
2023年12月30日
逝水莲花 LV7
2023年12月1日
2410068425 LV23
2023年11月27日
wuying8208 LV15
2023年11月25日
zxc131313 LV12
2023年11月19日
zcwmmd LV20
2023年11月18日
最近浏览更多
kenhomeliu LV29
4月30日
JulyMagnolia LV4
4月29日
chirsbey2
4月18日
暂无贡献等级
东北虎啸 LV3
4月17日
荣》Cowboy LV12
4月11日
xiaozhi丶 LV14
4月7日
朱朱啊哈 LV16
4月1日
微信网友_6927932988952576 LV12
3月29日
sunlzh888888 LV28
3月16日
SZEPEZS LV8
3月15日