Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
Y
yudao-cloud
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
hblj
yudao-cloud
Commits
695014a6
提交
695014a6
authored
2月 03, 2023
作者:
gaibu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat: 升级 spring doc 依赖
上级
6474fba9
隐藏空白字符变更
内嵌
并排
正在显示
11 个修改的文件
包含
49 行增加
和
62 行删除
+49
-62
pom.xml
yudao-dependencies/pom.xml
+5
-18
pom.xml
yudao-framework/yudao-common/pom.xml
+2
-2
PageParam.java
...ava/cn/iocoder/yudao/framework/common/pojo/PageParam.java
+4
-5
PageResult.java
...va/cn/iocoder/yudao/framework/common/pojo/PageResult.java
+4
-5
pom.xml
yudao-framework/yudao-spring-boot-starter-web/pom.xml
+3
-3
pom.xml
yudao-gateway/pom.xml
+3
-3
pom.xml
yudao-module-infra/yudao-module-infra-api/pom.xml
+6
-3
pom.xml
yudao-module-system/yudao-module-system-api/pom.xml
+6
-3
DeptApi.java
...java/cn/iocoder/yudao/module/system/api/dept/DeptApi.java
+10
-10
PostApi.java
...java/cn/iocoder/yudao/module/system/api/dept/PostApi.java
+6
-6
DictDataApi.java
.../cn/iocoder/yudao/module/system/api/dict/DictDataApi.java
+0
-4
没有找到文件。
yudao-dependencies/pom.xml
浏览文件 @
695014a6
...
...
@@ -23,6 +23,7 @@
<knife4j.version>
4.0.0
</knife4j.version>
<swagger-annotations.version>
1.6.8
</swagger-annotations.version>
<servlet.versoin>
2.5
</servlet.versoin>
<springdoc.version>
1.6.14
</springdoc.version>
<!-- DB 相关 -->
<druid.version>
1.2.15
</druid.version>
<mybatis-plus.version>
3.5.3.1
</mybatis-plus.version>
...
...
@@ -197,27 +198,13 @@
<dependency>
<groupId>
com.github.xiaoymin
</groupId>
<artifactId>
knife4j-openapi
2
-spring-boot-starter
</artifactId>
<artifactId>
knife4j-openapi
3
-spring-boot-starter
</artifactId>
<version>
${knife4j.version}
</version>
<exclusions>
<exclusion>
<artifactId>
mapstruct
</artifactId>
<groupId>
org.mapstruct
</groupId>
<!-- 避免冲突 -->
</exclusion>
<exclusion>
<artifactId>
guava
</artifactId>
<groupId>
com.google.guava
</groupId>
</exclusion>
<exclusion>
<artifactId>
swagger-annotations
</artifactId>
<groupId>
io.swagger
</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>
io.swagger
</groupId>
<artifactId>
s
wagger-annotations
</artifactId>
<version>
${s
wagger-annotations
.version}
</version>
<groupId>
org.springdoc
</groupId>
<artifactId>
s
pringdoc-openapi-ui
</artifactId>
<version>
${s
pringdoc
.version}
</version>
</dependency>
<!-- DB 相关 -->
...
...
yudao-framework/yudao-common/pom.xml
浏览文件 @
695014a6
...
...
@@ -59,8 +59,8 @@
</dependency>
<dependency>
<groupId>
io.swagger
</groupId>
<artifactId>
s
wagger-annotations
</artifactId>
<groupId>
org.springdoc
</groupId>
<artifactId>
s
pringdoc-openapi-ui
</artifactId>
<scope>
provided
</scope>
<!-- 设置为 provided,主要是 PageParam 使用到 -->
</dependency>
...
...
yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/pojo/PageParam.java
浏览文件 @
695014a6
package
cn
.
iocoder
.
yudao
.
framework
.
common
.
pojo
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Data
;
import
javax.validation.constraints.Min
;
...
...
@@ -9,19 +8,19 @@ import javax.validation.constraints.Max;
import
javax.validation.constraints.NotNull
;
import
java.io.Serializable
;
@
ApiModel
(
"分页参数"
)
@
Schema
(
description
=
"分页参数"
)
@Data
public
class
PageParam
implements
Serializable
{
private
static
final
Integer
PAGE_NO
=
1
;
private
static
final
Integer
PAGE_SIZE
=
10
;
@
ApiModelProperty
(
value
=
"页码,从 1 开始"
,
required
=
true
,
example
=
"1"
)
@
Schema
(
description
=
"页码,从 1 开始"
,
required
=
true
,
example
=
"1"
)
@NotNull
(
message
=
"页码不能为空"
)
@Min
(
value
=
1
,
message
=
"页码最小值为 1"
)
private
Integer
pageNo
=
PAGE_NO
;
@
ApiModelProperty
(
value
=
"每页条数,最大值为 100"
,
required
=
true
,
example
=
"10"
)
@
Schema
(
description
=
"每页条数,最大值为 100"
,
required
=
true
,
example
=
"10"
)
@NotNull
(
message
=
"每页条数不能为空"
)
@Min
(
value
=
1
,
message
=
"每页条数最小值为 1"
)
@Max
(
value
=
100
,
message
=
"每页条数最大值为 100"
)
...
...
yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/pojo/PageResult.java
浏览文件 @
695014a6
package
cn
.
iocoder
.
yudao
.
framework
.
common
.
pojo
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Data
;
import
java.io.Serializable
;
import
java.util.ArrayList
;
import
java.util.List
;
@
ApiModel
(
"分页结果"
)
@
Schema
(
description
=
"分页结果"
)
@Data
public
final
class
PageResult
<
T
>
implements
Serializable
{
@
ApiModelProperty
(
value
=
"数据"
,
required
=
true
)
@
Schema
(
description
=
"数据"
,
required
=
true
)
private
List
<
T
>
list
;
@
ApiModelProperty
(
value
=
"总量"
,
required
=
true
)
@
Schema
(
description
=
"总量"
,
required
=
true
)
private
Long
total
;
public
PageResult
()
{
...
...
yudao-framework/yudao-spring-boot-starter-web/pom.xml
浏览文件 @
695014a6
...
...
@@ -35,11 +35,11 @@
<dependency>
<groupId>
com.github.xiaoymin
</groupId>
<artifactId>
knife4j-openapi
2
-spring-boot-starter
</artifactId>
<artifactId>
knife4j-openapi
3
-spring-boot-starter
</artifactId>
</dependency>
<dependency>
<groupId>
io.swagger
</groupId>
<artifactId>
s
wagger-annotations
</artifactId>
<groupId>
org.springdoc
</groupId>
<artifactId>
s
pringdoc-openapi-ui
</artifactId>
</dependency>
<dependency>
...
...
yudao-gateway/pom.xml
浏览文件 @
695014a6
...
...
@@ -46,11 +46,11 @@
<dependency>
<groupId>
com.github.xiaoymin
</groupId>
<artifactId>
knife4j-openapi
2
-spring-boot-starter
</artifactId>
<artifactId>
knife4j-openapi
3
-spring-boot-starter
</artifactId>
</dependency>
<dependency>
<groupId>
io.swagger
</groupId>
<artifactId>
s
wagger-annotations
</artifactId>
<groupId>
org.springdoc
</groupId>
<artifactId>
s
pringdoc-openapi-ui
</artifactId>
</dependency>
<!-- RPC 远程调用相关 -->
...
...
yudao-module-infra/yudao-module-infra-api/pom.xml
浏览文件 @
695014a6
...
...
@@ -24,9 +24,12 @@
<!-- Web 相关 -->
<dependency>
<groupId>
io.swagger
</groupId>
<artifactId>
swagger-annotations
</artifactId>
<optional>
true
</optional>
<groupId>
com.github.xiaoymin
</groupId>
<artifactId>
knife4j-openapi3-spring-boot-starter
</artifactId>
</dependency>
<dependency>
<groupId>
org.springdoc
</groupId>
<artifactId>
springdoc-openapi-ui
</artifactId>
</dependency>
<!-- 参数校验 -->
...
...
yudao-module-system/yudao-module-system-api/pom.xml
浏览文件 @
695014a6
...
...
@@ -24,9 +24,12 @@
<!-- Web 相关 -->
<dependency>
<groupId>
io.swagger
</groupId>
<artifactId>
swagger-annotations
</artifactId>
<optional>
true
</optional>
<groupId>
com.github.xiaoymin
</groupId>
<artifactId>
knife4j-openapi3-spring-boot-starter
</artifactId>
</dependency>
<dependency>
<groupId>
org.springdoc
</groupId>
<artifactId>
springdoc-openapi-ui
</artifactId>
</dependency>
<!-- 参数校验 -->
...
...
yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/dept/DeptApi.java
浏览文件 @
695014a6
...
...
@@ -4,9 +4,9 @@ import cn.iocoder.yudao.framework.common.pojo.CommonResult;
import
cn.iocoder.yudao.framework.common.util.collection.CollectionUtils
;
import
cn.iocoder.yudao.module.system.api.dept.dto.DeptRespDTO
;
import
cn.iocoder.yudao.module.system.enums.ApiConstants
;
import
io.swagger.
annotations.Api
;
import
io.swagger.
annotations.ApiImplicitParam
;
import
io.swagger.
annotations.ApiOperation
;
import
io.swagger.
v3.oas.annotations.Operation
;
import
io.swagger.
v3.oas.annotations.Parameter
;
import
io.swagger.
v3.oas.annotations.tags.Tag
;
import
org.springframework.cloud.openfeign.FeignClient
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.RequestParam
;
...
...
@@ -17,24 +17,24 @@ import java.util.Map;
import
java.util.Set
;
@FeignClient
(
name
=
ApiConstants
.
NAME
)
// TODO 芋艿:fallbackFactory =
@
Api
(
tags
=
"RPC 服务 - 部门"
)
@
Tag
(
name
=
"RPC 服务 - 部门"
)
public
interface
DeptApi
{
String
PREFIX
=
ApiConstants
.
PREFIX
+
"/dept"
;
@GetMapping
(
PREFIX
+
"/get"
)
@
ApiOperation
(
"获得部门信息"
)
@
ApiImplicitParam
(
name
=
"id"
,
value
=
"部门编号"
,
example
=
"1024"
,
required
=
true
,
dataTypeClass
=
Long
.
class
)
@
Operation
(
summary
=
"获得部门信息"
)
@
Parameter
(
name
=
"id"
,
description
=
"部门编号"
,
example
=
"1024"
,
required
=
true
)
CommonResult
<
DeptRespDTO
>
getDept
(
@RequestParam
(
"id"
)
Long
id
);
@GetMapping
(
PREFIX
+
"/list"
)
@
ApiOperation
(
"获得部门信息数组"
)
@
ApiImplicitParam
(
name
=
"ids"
,
value
=
"部门编号数组"
,
example
=
"1,2"
,
required
=
true
,
allowMultiple
=
true
)
@
Operation
(
summary
=
"获得部门信息数组"
)
@
Parameter
(
name
=
"ids"
,
description
=
"部门编号数组"
,
example
=
"1,2"
,
required
=
true
)
CommonResult
<
List
<
DeptRespDTO
>>
getDeptList
(
@RequestParam
(
"ids"
)
Collection
<
Long
>
ids
);
@GetMapping
(
PREFIX
+
"/valid"
)
@
ApiOperation
(
"校验部门是否合法"
)
@
ApiImplicitParam
(
name
=
"ids"
,
value
=
"部门编号数组"
,
example
=
"1,2"
,
required
=
true
,
allowMultiple
=
true
)
@
Operation
(
summary
=
"校验部门是否合法"
)
@
Parameter
(
name
=
"ids"
,
description
=
"部门编号数组"
,
example
=
"1,2"
,
required
=
true
)
CommonResult
<
Boolean
>
validateDeptList
(
@RequestParam
(
"ids"
)
Collection
<
Long
>
ids
);
/**
...
...
yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/dept/PostApi.java
浏览文件 @
695014a6
...
...
@@ -2,9 +2,9 @@ package cn.iocoder.yudao.module.system.api.dept;
import
cn.iocoder.yudao.framework.common.pojo.CommonResult
;
import
cn.iocoder.yudao.module.system.enums.ApiConstants
;
import
io.swagger.
annotations.Api
;
import
io.swagger.
annotations.ApiImplicitParam
;
import
io.swagger.
annotations.ApiOperation
;
import
io.swagger.
v3.oas.annotations.Operation
;
import
io.swagger.
v3.oas.annotations.Parameter
;
import
io.swagger.
v3.oas.annotations.tags.Tag
;
import
org.springframework.cloud.openfeign.FeignClient
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.RequestParam
;
...
...
@@ -12,14 +12,14 @@ import org.springframework.web.bind.annotation.RequestParam;
import
java.util.Collection
;
@FeignClient
(
name
=
ApiConstants
.
NAME
)
// TODO 芋艿:fallbackFactory =
@
Api
(
tags
=
"RPC 服务 - 岗位"
)
@
Tag
(
name
=
"RPC 服务 - 岗位"
)
public
interface
PostApi
{
String
PREFIX
=
ApiConstants
.
PREFIX
+
"/post"
;
@GetMapping
(
PREFIX
+
"/valid"
)
@
ApiOperation
(
"校验岗位是否合法"
)
@
ApiImplicitParam
(
name
=
"ids"
,
value
=
"岗位编号数组"
,
example
=
"1,2"
,
required
=
true
,
allowMultiple
=
true
)
@
Operation
(
summary
=
"校验岗位是否合法"
)
@
Parameter
(
name
=
"ids"
,
description
=
"岗位编号数组"
,
example
=
"1,2"
,
required
=
true
)
CommonResult
<
Boolean
>
validPostList
(
@RequestParam
(
"ids"
)
Collection
<
Long
>
ids
);
}
yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/dict/DictDataApi.java
浏览文件 @
695014a6
...
...
@@ -3,10 +3,6 @@ package cn.iocoder.yudao.module.system.api.dict;
import
cn.iocoder.yudao.framework.common.pojo.CommonResult
;
import
cn.iocoder.yudao.module.system.api.dict.dto.DictDataRespDTO
;
import
cn.iocoder.yudao.module.system.enums.ApiConstants
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiImplicitParams
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.cloud.openfeign.FeignClient
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.RequestParam
;
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论