SwaggerConfig
@Configuration
@EnableSwagger2
public class SwaggerConfig {
// 配置了swagger的docket的bean实例
@Bean
public Docket docket() {
return new Docket(DocumentationType.SWAGGER_2).apiInfo(apiInfo());
}
private ApiInfo apiInfo() {
//作者信息
Contact contact = new Contact("gui", "https://www.cnblogs.com/keacua/", "123456789@qq.com");
return new ApiInfo(
"gui 的SwaggerApi文档",
"108的一猿",
"1.0",
"https://www.cnblogs.com/keacua/",
contact,
"Apache 2.0",
"http://www.apache.org/licenses/LICENSE-2.0",
new ArrayList()
);
}
}
结果
Swagger学习-配置信息