Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
Y
yudao-cloud
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
hblj
yudao-cloud
Commits
59c6963f
提交
59c6963f
authored
3月 04, 2023
作者:
YunaiV
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
优化 Swagger 的版本依赖,避免冲突
上级
e28d73a7
隐藏空白字符变更
内嵌
并排
正在显示
17 个修改的文件
包含
135 行增加
和
78 行删除
+135
-78
pom.xml
yudao-dependencies/pom.xml
+38
-9
pom.xml
yudao-framework/yudao-common/pom.xml
+3
-3
pom.xml
yudao-framework/yudao-spring-boot-starter-web/pom.xml
+13
-8
BpmSecurityConfiguration.java
...le/bpm/framework/bpm/config/BpmSecurityConfiguration.java
+0
-28
SecurityConfiguration.java
.../bpm/framework/security/config/SecurityConfiguration.java
+2
-4
application.yaml
.../yudao-module-bpm-biz/src/main/resources/application.yaml
+15
-0
pom.xml
yudao-module-infra/yudao-module-infra-api/pom.xml
+3
-2
InfraServerApplication.java
...cn/iocoder/yudao/module/infra/InfraServerApplication.java
+0
-2
SecurityConfiguration.java
...nfra/framework/security/config/SecurityConfiguration.java
+2
-4
application.yaml
...udao-module-infra-biz/src/main/resources/application.yaml
+15
-0
SecurityConfiguration.java
...port/framework/security/config/SecurityConfiguration.java
+2
-4
application.yaml
...dao-module-report-biz/src/main/resources/application.yaml
+15
-0
pom.xml
yudao-module-system/yudao-module-system-api/pom.xml
+3
-2
AdminUserApi.java
...cn/iocoder/yudao/module/system/api/user/AdminUserApi.java
+4
-5
AdminUserApiImpl.java
...ocoder/yudao/module/system/api/user/AdminUserApiImpl.java
+3
-3
SecurityConfiguration.java
...stem/framework/security/config/SecurityConfiguration.java
+2
-4
application.yaml
...dao-module-system-biz/src/main/resources/application.yaml
+15
-0
没有找到文件。
yudao-dependencies/pom.xml
浏览文件 @
59c6963f
...
...
@@ -16,14 +16,14 @@
<properties>
<revision>
1.6.6-snapshot
</revision>
<!-- 统一依赖管理 -->
<spring.boot.version>
2.7.
7
</spring.boot.version>
<spring.boot.version>
2.7.
8
</spring.boot.version>
<spring.cloud.version>
2021.0.5
</spring.cloud.version>
<spring.cloud.alibaba.version>
2021.0.4.0
</spring.cloud.alibaba.version>
<!-- Web 相关 -->
<knife4j.version>
4.0.0
</knife4j.version>
<swagger-annotations.version>
1.6.8
</swagger-annotations.version>
<servlet.versoin>
2.5
</servlet.versoin>
<swagger.version>
2.2.8
</swagger.version>
<springdoc.version>
1.6.14
</springdoc.version>
<knife4j.version>
4.0.0
</knife4j.version>
<!-- DB 相关 -->
<druid.version>
1.2.15
</druid.version>
<mybatis-plus.version>
3.5.3.1
</mybatis-plus.version>
...
...
@@ -199,15 +199,39 @@
</dependency>
<dependency>
<groupId>
org.springdoc
</groupId
>
<artifactId>
s
pringdoc-openapi-webflux-ui
</artifactId>
<version>
1.6.14
</version>
<groupId>
io.swagger.core.v3
</groupId>
<!-- 接口文档:使用最新版本的 Swagger 模型 --
>
<artifactId>
s
wagger-annotations
</artifactId>
<version>
${swagger.version}
</version>
</dependency>
<dependency>
<groupId>
org.springdoc
</groupId>
<groupId>
io.swagger.core.v3
</groupId>
<!-- 接口文档:使用最新版本的 Swagger 模型 -->
<artifactId>
swagger-models
</artifactId>
<version>
${swagger.version}
</version>
</dependency>
<dependency>
<groupId>
org.springdoc
</groupId>
<!-- 接口文档 UI:解决 knife4j 引入的 Spring Doc 版本太老 -->
<artifactId>
springdoc-openapi-common
</artifactId>
<version>
${springdoc.version}
</version>
</dependency>
<dependency>
<groupId>
org.springdoc
</groupId>
<!-- 接口文档 UI:解决 knife4j 引入的 Spring Doc 版本太老 -->
<artifactId>
springdoc-openapi-webmvc-core
</artifactId>
<version>
1.6.14
</version>
<version>
${springdoc.version}
</version>
</dependency>
<dependency>
<groupId>
org.springdoc
</groupId>
<!-- 接口文档 UI:解决 knife4j 引入的 Spring Doc 版本太老 -->
<artifactId>
springdoc-openapi-webflux-core
</artifactId>
<version>
${springdoc.version}
</version>
</dependency>
<dependency>
<groupId>
org.springdoc
</groupId>
<!-- 接口文档 UI:默认 -->
<artifactId>
springdoc-openapi-ui
</artifactId>
<version>
${springdoc.version}
</version>
</dependency>
<dependency>
<groupId>
com.github.xiaoymin
</groupId>
<!-- 接口文档 UI:knife4j -->
<artifactId>
knife4j-openapi3-spring-boot-starter
</artifactId>
<version>
${knife4j.version}
</version>
</dependency>
<!-- DB 相关 -->
...
...
@@ -216,6 +240,11 @@
<artifactId>
yudao-spring-boot-starter-mybatis
</artifactId>
<version>
${revision}
</version>
</dependency>
<dependency>
<!-- TODO 芋艿:说不清楚 -->
<groupId>
org.springdoc
</groupId>
<artifactId>
springdoc-openapi-webflux-ui
</artifactId>
<version>
${springdoc.version}
</version>
</dependency>
<dependency>
<groupId>
com.alibaba
</groupId>
...
...
yudao-framework/yudao-common/pom.xml
浏览文件 @
59c6963f
...
...
@@ -59,9 +59,9 @@
</dependency>
<dependency>
<groupId>
org.springdoc
</groupId
>
<artifactId>
s
pringdoc-openapi-webmvc-core
</artifactId>
<scope>
compile
</scope>
<groupId>
io.swagger.core.v3
</groupId>
<!-- 接口文档:使用最新版本的 Swagger 模型 --
>
<artifactId>
s
wagger-annotations
</artifactId>
<scope>
provided
</scope>
</dependency>
<!-- 监控相关 -->
...
...
yudao-framework/yudao-spring-boot-starter-web/pom.xml
浏览文件 @
59c6963f
...
...
@@ -21,9 +21,11 @@
<artifactId>
yudao-common
</artifactId>
</dependency>
<!-- Spring Boot 配置所需依赖 -->
<dependency>
<groupId>
org.springdoc
</groupId>
<artifactId>
springdoc-openapi-webmvc-core
</artifactId>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-configuration-processor
</artifactId>
<optional>
true
</optional>
</dependency>
<!-- Web 相关 -->
...
...
@@ -31,12 +33,6 @@
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-web
</artifactId>
</dependency>
<!-- spring boot 配置所需依赖 -->
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-configuration-processor
</artifactId>
<optional>
true
</optional>
</dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
...
...
@@ -49,6 +45,15 @@
<scope>
provided
</scope>
<!-- 设置为 provided,主要是 GlobalExceptionHandler 使用 -->
</dependency>
<dependency>
<groupId>
com.github.xiaoymin
</groupId>
<!-- 接口文档 -->
<artifactId>
knife4j-openapi3-spring-boot-starter
</artifactId>
</dependency>
<dependency>
<groupId>
org.springdoc
</groupId>
<!-- 接口文档 -->
<artifactId>
springdoc-openapi-ui
</artifactId>
</dependency>
<!-- RPC 远程调用相关 -->
<dependency>
<groupId>
cn.iocoder.cloud
</groupId>
...
...
yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/bpm/config/BpmSecurityConfiguration.java
deleted
100644 → 0
浏览文件 @
e28d73a7
package
cn
.
iocoder
.
yudao
.
module
.
bpm
.
framework
.
bpm
.
config
;
import
cn.iocoder.yudao.framework.security.config.AuthorizeRequestsCustomizer
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.security.config.annotation.web.builders.HttpSecurity
;
import
org.springframework.security.config.annotation.web.configurers.ExpressionUrlAuthorizationConfigurer
;
/**
* @author kemengkai
* @create 2022-05-07 08:15
*/
@Configuration
(
proxyBeanMethods
=
false
,
value
=
"bpmSecurityConfiguration"
)
public
class
BpmSecurityConfiguration
{
@Bean
(
"bpmAuthorizeRequestsCustomizer"
)
public
AuthorizeRequestsCustomizer
authorizeRequestsCustomizer
()
{
return
new
AuthorizeRequestsCustomizer
()
{
@Override
public
void
customize
(
ExpressionUrlAuthorizationConfigurer
<
HttpSecurity
>.
ExpressionInterceptUrlRegistry
registry
)
{
// 任务回退接口
registry
.
antMatchers
(
buildAdminApi
(
"/bpm/task/back"
)).
permitAll
();
}
};
}
}
yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/security/config/SecurityConfiguration.java
浏览文件 @
59c6963f
...
...
@@ -21,10 +21,8 @@ public class SecurityConfiguration {
public
void
customize
(
ExpressionUrlAuthorizationConfigurer
<
HttpSecurity
>.
ExpressionInterceptUrlRegistry
registry
)
{
// TODO 芋艿:这个每个项目都需要重复配置,得捉摸有没通用的方案
// Swagger 接口文档
registry
.
antMatchers
(
"/swagger-ui.html"
).
anonymous
()
.
antMatchers
(
"/swagger-resources/**"
).
anonymous
()
.
antMatchers
(
"/webjars/**"
).
anonymous
()
.
antMatchers
(
"/*/api-docs"
).
anonymous
();
registry
.
antMatchers
(
"/v3/api-docs/**"
).
permitAll
()
// 元数据
.
antMatchers
(
"/swagger-ui.html"
).
permitAll
();
// Swagger UI
// Druid 监控
registry
.
antMatchers
(
"/druid/**"
).
anonymous
();
// Spring Boot Actuator 的安全配置
...
...
yudao-module-bpm/yudao-module-bpm-biz/src/main/resources/application.yaml
浏览文件 @
59c6963f
...
...
@@ -27,6 +27,21 @@ spring:
redis
:
time-to-live
:
1h
# 设置过期时间为 1 小时
---
#################### 接口文档配置 ####################
springdoc
:
api-docs
:
enabled
:
true
# 1. 是否开启 Swagger 接文档的元数据
path
:
/v3/api-docs
swagger-ui
:
enabled
:
true
# 2.1 是否开启 Swagger 文档的官方 UI 界面
path
:
/swagger-ui.html
knife4j
:
enable
:
true
# 2.2 是否开启 Swagger 文档的 Knife4j UI 界面
setting
:
language
:
zh_cn
# 工作流 Flowable 配置
flowable
:
# 1. false: 默认值,Flowable 启动时,对比数据库表中保存的版本,如果不匹配。将抛出异常
...
...
yudao-module-infra/yudao-module-infra-api/pom.xml
浏览文件 @
59c6963f
...
...
@@ -24,8 +24,9 @@
<!-- Web 相关 -->
<dependency>
<groupId>
org.springdoc
</groupId>
<artifactId>
springdoc-openapi-webmvc-core
</artifactId>
<groupId>
io.swagger.core.v3
</groupId>
<!-- 接口文档:使用最新版本的 Swagger 模型 -->
<artifactId>
swagger-annotations
</artifactId>
<scope>
provided
</scope>
</dependency>
<!-- 参数校验 -->
...
...
yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/InfraServerApplication.java
浏览文件 @
59c6963f
package
cn
.
iocoder
.
yudao
.
module
.
infra
;
import
io.swagger.v3.oas.annotations.OpenAPIDefinition
;
import
io.swagger.v3.oas.annotations.info.Info
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
...
...
yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/framework/security/config/SecurityConfiguration.java
浏览文件 @
59c6963f
...
...
@@ -24,10 +24,8 @@ public class SecurityConfiguration {
@Override
public
void
customize
(
ExpressionUrlAuthorizationConfigurer
<
HttpSecurity
>.
ExpressionInterceptUrlRegistry
registry
)
{
// Swagger 接口文档
registry
.
antMatchers
(
"/swagger-ui.html"
).
anonymous
()
.
antMatchers
(
"/swagger-resources/**"
).
anonymous
()
.
antMatchers
(
"/webjars/**"
).
anonymous
()
.
antMatchers
(
"/*/api-docs"
).
anonymous
();
registry
.
antMatchers
(
"/v3/api-docs/**"
).
permitAll
()
// 元数据
.
antMatchers
(
"/swagger-ui.html"
).
permitAll
();
// Swagger UI
// Spring Boot Actuator 的安全配置
registry
.
antMatchers
(
"/actuator"
).
anonymous
()
.
antMatchers
(
"/actuator/**"
).
anonymous
();
...
...
yudao-module-infra/yudao-module-infra-biz/src/main/resources/application.yaml
浏览文件 @
59c6963f
...
...
@@ -27,6 +27,21 @@ spring:
redis
:
time-to-live
:
1h
# 设置过期时间为 1 小时
---
#################### 接口文档配置 ####################
springdoc
:
api-docs
:
enabled
:
true
# 1. 是否开启 Swagger 接文档的元数据
path
:
/v3/api-docs
swagger-ui
:
enabled
:
true
# 2.1 是否开启 Swagger 文档的官方 UI 界面
path
:
/swagger-ui.html
knife4j
:
enable
:
true
# 2.2 是否开启 Swagger 文档的 Knife4j UI 界面
setting
:
language
:
zh_cn
# MyBatis Plus 的配置项
mybatis-plus
:
configuration
:
...
...
yudao-module-report/yudao-module-report-biz/src/main/java/cn/iocoder/yudao/module/report/framework/security/config/SecurityConfiguration.java
浏览文件 @
59c6963f
...
...
@@ -19,10 +19,8 @@ public class SecurityConfiguration {
@Override
public
void
customize
(
ExpressionUrlAuthorizationConfigurer
<
HttpSecurity
>.
ExpressionInterceptUrlRegistry
registry
)
{
// Swagger 接口文档
registry
.
antMatchers
(
"/swagger-ui.html"
).
anonymous
()
.
antMatchers
(
"/swagger-resources/**"
).
anonymous
()
.
antMatchers
(
"/webjars/**"
).
anonymous
()
.
antMatchers
(
"/*/api-docs"
).
anonymous
();
registry
.
antMatchers
(
"/v3/api-docs/**"
).
permitAll
()
// 元数据
.
antMatchers
(
"/swagger-ui.html"
).
permitAll
();
// Swagger UI
// Spring Boot Actuator 的安全配置
registry
.
antMatchers
(
"/actuator"
).
anonymous
()
.
antMatchers
(
"/actuator/**"
).
anonymous
();
...
...
yudao-module-report/yudao-module-report-biz/src/main/resources/application.yaml
浏览文件 @
59c6963f
...
...
@@ -27,6 +27,21 @@ spring:
redis
:
time-to-live
:
1h
# 设置过期时间为 1 小时
---
#################### 接口文档配置 ####################
springdoc
:
api-docs
:
enabled
:
true
# 1. 是否开启 Swagger 接文档的元数据
path
:
/v3/api-docs
swagger-ui
:
enabled
:
true
# 2.1 是否开启 Swagger 文档的官方 UI 界面
path
:
/swagger-ui.html
knife4j
:
enable
:
true
# 2.2 是否开启 Swagger 文档的 Knife4j UI 界面
setting
:
language
:
zh_cn
# MyBatis Plus 的配置项
mybatis-plus
:
configuration
:
...
...
yudao-module-system/yudao-module-system-api/pom.xml
浏览文件 @
59c6963f
...
...
@@ -24,8 +24,9 @@
<!-- Web 相关 -->
<dependency>
<groupId>
org.springdoc
</groupId>
<artifactId>
springdoc-openapi-webmvc-core
</artifactId>
<groupId>
io.swagger.core.v3
</groupId>
<!-- 接口文档:使用最新版本的 Swagger 模型 -->
<artifactId>
swagger-annotations
</artifactId>
<scope>
provided
</scope>
<!-- 设置为 provided,主要是 PageParam 使用到 -->
</dependency>
<!-- 参数校验 -->
...
...
yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/user/AdminUserApi.java
浏览文件 @
59c6963f
...
...
@@ -35,12 +35,12 @@ public interface AdminUserApi {
@GetMapping
(
PREFIX
+
"/list-by-dept-id"
)
@Operation
(
summary
=
"获得指定部门的用户数组"
)
@Parameter
(
name
=
"deptIds"
,
description
=
"部门编号数组"
,
example
=
"1,2"
,
required
=
true
)
CommonResult
<
List
<
AdminUserRespDTO
>>
getUser
s
ByDeptIds
(
@RequestParam
(
"deptIds"
)
Collection
<
Long
>
deptIds
);
CommonResult
<
List
<
AdminUserRespDTO
>>
getUser
List
ByDeptIds
(
@RequestParam
(
"deptIds"
)
Collection
<
Long
>
deptIds
);
@GetMapping
(
PREFIX
+
"/list-by-post-id"
)
@Operation
(
summary
=
"获得指定岗位的用户数组"
)
@Parameter
(
name
=
"postIds"
,
description
=
"岗位编号数组"
,
example
=
"2,3"
,
required
=
true
)
CommonResult
<
List
<
AdminUserRespDTO
>>
getUser
s
ByPostIds
(
@RequestParam
(
"postIds"
)
Collection
<
Long
>
postIds
);
CommonResult
<
List
<
AdminUserRespDTO
>>
getUser
List
ByPostIds
(
@RequestParam
(
"postIds"
)
Collection
<
Long
>
postIds
);
/**
* 获得用户 Map
...
...
@@ -55,6 +55,6 @@ public interface AdminUserApi {
@GetMapping
(
PREFIX
+
"/valid"
)
@Operation
(
summary
=
"校验用户们是否有效"
)
@Parameter
(
name
=
"ids"
,
description
=
"用户编号数组"
,
example
=
"3,5"
,
required
=
true
)
CommonResult
<
Boolean
>
validUser
s
(
@RequestParam
(
"ids"
)
Set
<
Long
>
ids
);
CommonResult
<
Boolean
>
validUser
List
(
@RequestParam
(
"ids"
)
Set
<
Long
>
ids
);
}
\ No newline at end of file
}
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/api/user/AdminUserApiImpl.java
浏览文件 @
59c6963f
...
...
@@ -39,19 +39,19 @@ public class AdminUserApiImpl implements AdminUserApi {
}
@Override
public
CommonResult
<
List
<
AdminUserRespDTO
>>
getUser
s
ByDeptIds
(
Collection
<
Long
>
deptIds
)
{
public
CommonResult
<
List
<
AdminUserRespDTO
>>
getUser
List
ByDeptIds
(
Collection
<
Long
>
deptIds
)
{
List
<
AdminUserDO
>
users
=
userService
.
getUserListByDeptIds
(
deptIds
);
return
success
(
UserConvert
.
INSTANCE
.
convertList4
(
users
));
}
@Override
public
CommonResult
<
List
<
AdminUserRespDTO
>>
getUser
s
ByPostIds
(
Collection
<
Long
>
postIds
)
{
public
CommonResult
<
List
<
AdminUserRespDTO
>>
getUser
List
ByPostIds
(
Collection
<
Long
>
postIds
)
{
List
<
AdminUserDO
>
users
=
userService
.
getUserListByPostIds
(
postIds
);
return
success
(
UserConvert
.
INSTANCE
.
convertList4
(
users
));
}
@Override
public
CommonResult
<
Boolean
>
validUser
s
(
Set
<
Long
>
ids
)
{
public
CommonResult
<
Boolean
>
validUser
List
(
Set
<
Long
>
ids
)
{
userService
.
validateUserList
(
ids
);
return
success
(
true
);
}
...
...
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/framework/security/config/SecurityConfiguration.java
浏览文件 @
59c6963f
...
...
@@ -21,10 +21,8 @@ public class SecurityConfiguration {
public
void
customize
(
ExpressionUrlAuthorizationConfigurer
<
HttpSecurity
>.
ExpressionInterceptUrlRegistry
registry
)
{
// TODO 芋艿:这个每个项目都需要重复配置,得捉摸有没通用的方案
// Swagger 接口文档
registry
.
antMatchers
(
"/swagger-ui.html"
).
anonymous
()
.
antMatchers
(
"/swagger-resources/**"
).
anonymous
()
.
antMatchers
(
"/webjars/**"
).
anonymous
()
.
antMatchers
(
"/*/api-docs"
).
anonymous
();
registry
.
antMatchers
(
"/v3/api-docs/**"
).
permitAll
()
// 元数据
.
antMatchers
(
"/swagger-ui.html"
).
permitAll
();
// Swagger UI
// Druid 监控
registry
.
antMatchers
(
"/druid/**"
).
anonymous
();
// Spring Boot Actuator 的安全配置
...
...
yudao-module-system/yudao-module-system-biz/src/main/resources/application.yaml
浏览文件 @
59c6963f
...
...
@@ -27,6 +27,21 @@ spring:
redis
:
time-to-live
:
1h
# 设置过期时间为 1 小时
---
#################### 接口文档配置 ####################
springdoc
:
api-docs
:
enabled
:
true
# 1. 是否开启 Swagger 接文档的元数据
path
:
/v3/api-docs
swagger-ui
:
enabled
:
true
# 2.1 是否开启 Swagger 文档的官方 UI 界面
path
:
/swagger-ui.html
knife4j
:
enable
:
true
# 2.2 是否开启 Swagger 文档的 Knife4j UI 界面
setting
:
language
:
zh_cn
# MyBatis Plus 的配置项
mybatis-plus
:
configuration
:
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论