/**
* api信息
*
* @param name 标题
* @param description 描述
* @param version 版本
* @return
*/
private ApiInfo apiInfo(String name, String description, String version) {
return new ApiInfoBuilder().title(name).description(description).version(version).build();
}
//定义不同的Docket 进行分组展示api 可以使用包来区分,也可以取使用路由来区分
//这是按包来分组
// @Bean
// public Docket api() {
// return new Docket(DocumentationType.SWAGGER_2)
// .apiInfo(apiInfo())
// .select()
// .apis(RequestHandlerSelectors.basePackage("com.meike.station"))
// .paths(PathSelectors.any())
// .build()
// .groupName("api组");
// }
/**
* 按照路由来分组
*
* @return
*/
@Bean
public Docket web_api_admin() {
return new Docket(DocumentationType.SWAGGER_2)
.apiInfo(apiInfo("admin-api", "系统管理员", "1.0"))
.select()
.apis(RequestHandlerSelectors.any())
.paths(PathSelectors.ant("/api/admin/**"))
.build()
.groupName("系统管理员:web-admin-接口文档V1.0")
.pathMapping("/");
}
@Bean
public Docket web_api_bm() {
return new Docket(DocumentationType.SWAGGER_2)
.apiInfo(apiInfo("bm-api", "商家管理员", "1.0"))
.select()
.apis(RequestHandlerSelectors.any())
.paths(PathSelectors.ant("/api/business/manager/**"))
.build()
.groupName("商家管理员:web-bm-接口文档V1.0")
.pathMapping("/");
}
@Bean
public Docket web_api_bo() {
return new Docket(DocumentationType.SWAGGER_2)
.apiInfo(apiInfo("bo-api", "商家运营", "1.0"))
.select()
.apis(RequestHandlerSelectors.any())
.paths(PathSelectors.ant("/api/business/operation/**"))
.build()
.groupName("商家运营:web-bo-接口文档V1.0")
.pathMapping("/");
}
@Bean
public Docket web_api_sm() {
return new Docket(DocumentationType.SWAGGER_2)
.apiInfo(apiInfo("sm-api", "站管理员", "1.0"))
.select()
.apis(RequestHandlerSelectors.any())
.paths(PathSelectors.ant("/api/station/manager/**"))
.build()
.groupName("站管理员:web-sm-接口文档V1.0")
.pathMapping("/");
}
@Bean
public Docket web_api_so() {
return new Docket(DocumentationType.SWAGGER_2)
.apiInfo(apiInfo("so-api", "站运营", "1.0"))
.select()
.apis(RequestHandlerSelectors.any())
.paths(PathSelectors.ant("/api/station/operation/**"))
.build()
.groupName("站运营:web-so-接口文档V1.0")
.pathMapping("/");
}
@Bean
public Docket xcx_api() {
return new Docket(DocumentationType.SWAGGER_2)
.apiInfo(apiInfo("xcx-api", "小程序", "1.0"))
.select()
.apis(RequestHandlerSelectors.any())
.paths(PathSelectors.ant("/xcx/**"))
.build()
.groupName("小程序:xcx-接口文档V1.0")
.pathMapping("/");
}
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 记一次.NET内存居高不下排查解决与启示
· 探究高空视频全景AR技术的实现原理
· 理解Rust引用及其生命周期标识(上)
· 浏览器原生「磁吸」效果!Anchor Positioning 锚点定位神器解析
· 没有源码,如何修改代码逻辑?
· 全程不用写代码,我用AI程序员写了一个飞机大战
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· 记一次.NET内存居高不下排查解决与启示
· DeepSeek 开源周回顾「GitHub 热点速览」
· 白话解读 Dapr 1.15:你的「微服务管家」又秀新绝活了
2016-12-04 Jquery datepicker 时间插件使用 js 时间相加,相减