Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
I
ims-ci-test
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
test-ci
ims-ci-test
Commits
09968b4f
提交
09968b4f
authored
5月 20, 2023
作者:
余乾开
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
hotfix(config):knife4j version
上级
d40182a0
显示空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
16 行增加
和
11 行删除
+16
-11
pom.xml
pom.xml
+10
-6
Knife4jConfiguration.java
...java/com/mmc/csf/release/config/Knife4jConfiguration.java
+6
-5
没有找到文件。
pom.xml
浏览文件 @
09968b4f
<project
xmlns=
"http://maven.apache.org/POM/4.0.0"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"
>
<project
xmlns=
"http://maven.apache.org/POM/4.0.0"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"
>
<modelVersion>
4.0.0
</modelVersion>
<groupId>
com.mmc.csf
</groupId>
<artifactId>
iuav-ims
</artifactId>
...
...
@@ -11,7 +12,7 @@
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-parent
</artifactId>
<version>
2.2.6.RELEASE
</version>
<relativePath
/>
<relativePath
/>
</parent>
<properties>
...
...
@@ -44,13 +45,16 @@
<version>
1.2.58
</version>
</dependency>
<!--引入Knife4j的官方start包,该指南选择Spring Boot版本<3.0,开发者需要注意-->
<dependency>
<groupId>
com.github.xiaoymin
</groupId>
<artifactId>
knife4j-openapi2-spring-boot-starter
</artifactId>
<version>
4.0.0
</version>
<artifactId>
knife4j-spring-boot-starter
</artifactId>
<version>
3.0.2
</version>
</dependency>
<dependency>
<groupId>
com.github.xiaoymin
</groupId>
<artifactId>
knife4j-spring-ui
</artifactId>
<version>
3.0.2
</version>
</dependency>
<!--logback 日志 -->
<dependency>
<groupId>
net.logstash.logback
</groupId>
...
...
release-service/src/main/java/com/mmc/csf/release/config/Knife4jConfiguration.java
浏览文件 @
09968b4f
...
...
@@ -22,23 +22,24 @@ public class Knife4jConfiguration {
@Bean
(
value
=
"defaultApi2"
)
public
Docket
defaultApi2
()
{
Docket
docket
=
new
Docket
(
DocumentationType
.
SWAGGER_2
)
Docket
docket
=
new
Docket
(
DocumentationType
.
SWAGGER_2
)
.
apiInfo
(
apiInfo
())
//
分组名称
//
分组名称
.
groupName
(
"信息发布服务"
)
.
select
()
//
这里指定Controller扫描包路径
//
这里指定Controller扫描包路径
.
apis
(
RequestHandlerSelectors
.
basePackage
(
"com.mmc.csf.release.controller"
))
.
paths
(
PathSelectors
.
any
())
.
build
();
return
docket
;
}
private
ApiInfo
apiInfo
(){
private
ApiInfo
apiInfo
()
{
return
new
ApiInfoBuilder
()
.
title
(
"iuav信息发布相关"
)
.
description
(
"swagger-bootstrap-ui-demo RESTful APIs"
)
.
termsOfServiceUrl
(
"https://www.iuav.com/"
)
.
contact
(
"group@qq.com"
)
.
version
(
"1.0"
)
.
build
();
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论