Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
Y
yudao-cloud
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
hblj
yudao-cloud
Commits
b1149279
提交
b1149279
authored
6月 11, 2022
作者:
YunaiV
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
简化 application.yaml 和 bootstrap.yaml 等配置文件
上级
f08fe241
隐藏空白字符变更
内嵌
并排
正在显示
13 个修改的文件
包含
11 行增加
和
473 行删除
+11
-473
pom.xml
trade-service-project/trade-service-integration-test/pom.xml
+0
-29
TradeOrderServiceImplTest.java
...service/service/order/impl/TradeOrderServiceImplTest.java
+0
-34
package-info.java
...iocoder/mall/tradeservice/service/order/package-info.java
+0
-1
SecurityProperties.java
...r/yudao/framework/security/config/SecurityProperties.java
+3
-3
WebProperties.java
.../cn/iocoder/yudao/framework/web/config/WebProperties.java
+6
-2
application-dev.yaml
...-module-infra-biz/src/main/resources/application-dev.yaml
+0
-88
application.yaml
...udao-module-infra-biz/src/main/resources/application.yaml
+0
-56
bootstrap-local.yaml
...-module-infra-biz/src/main/resources/bootstrap-local.yaml
+0
-94
PermissionApi.java
...der/yudao/module/system/api/permission/PermissionApi.java
+1
-1
AdminAuthServiceImpl.java
...udao/module/system/service/auth/AdminAuthServiceImpl.java
+1
-1
application-dev.yaml
...module-system-biz/src/main/resources/application-dev.yaml
+0
-55
application-local.yaml
...dule-system-biz/src/main/resources/application-local.yaml
+0
-62
application.yaml
...dao-module-system-biz/src/main/resources/application.yaml
+0
-47
没有找到文件。
trade-service-project/trade-service-integration-test/pom.xml
deleted
100644 → 0
浏览文件 @
f08fe241
<?xml version="1.0" encoding="UTF-8"?>
<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 http://maven.apache.org/xsd/maven-4.0.0.xsd"
>
<parent>
<artifactId>
trade-service-project
</artifactId>
<groupId>
cn.iocoder.mall
</groupId>
<version>
1.0-SNAPSHOT
</version>
</parent>
<modelVersion>
4.0.0
</modelVersion>
<artifactId>
trade-service-integration-test
</artifactId>
<dependencies>
<dependency>
<groupId>
cn.iocoder.mall
</groupId>
<artifactId>
trade-service-app
</artifactId>
<version>
1.0-SNAPSHOT
</version>
</dependency>
<!-- Test 相关 -->
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-test
</artifactId>
<scope>
test
</scope>
</dependency>
</dependencies>
</project>
trade-service-project/trade-service-integration-test/src/test/java/cn/iocoder/mall/tradeservice/service/order/impl/TradeOrderServiceImplTest.java
deleted
100644 → 0
浏览文件 @
f08fe241
package
cn
.
iocoder
.
mall
.
tradeservice
.
service
.
order
.
impl
;
import
cn.iocoder.mall.tradeservice.rpc.order.dto.TradeOrderCreateReqDTO
;
import
org.junit.Test
;
import
org.junit.runner.RunWith
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.boot.test.context.SpringBootTest
;
import
org.springframework.test.context.junit4.SpringRunner
;
import
java.util.Arrays
;
@RunWith
(
SpringRunner
.
class
)
@SpringBootTest
public
class
TradeOrderServiceImplTest
{
@Autowired
private
TradeOrderServiceImpl
tradeOrderService
;
@Test
public
void
testCreateTradeOrder
()
{
TradeOrderCreateReqDTO
createReqDTO
=
new
TradeOrderCreateReqDTO
()
.
setUserId
(
243
)
.
setIp
(
"127.0.0.1"
)
.
setUserAddressId
(
19
)
.
setCouponCardId
(
null
)
.
setRemark
(
"我是备注"
)
.
setOrderItems
(
Arrays
.
asList
(
new
TradeOrderCreateReqDTO
.
OrderItem
().
setSkuId
(
3
).
setQuantity
(
1
),
new
TradeOrderCreateReqDTO
.
OrderItem
().
setSkuId
(
4
).
setQuantity
(
2
)
));
tradeOrderService
.
createTradeOrder
(
createReqDTO
);
}
}
trade-service-project/trade-service-integration-test/src/test/java/cn/iocoder/mall/tradeservice/service/order/package-info.java
deleted
100644 → 0
浏览文件 @
f08fe241
package
cn
.
iocoder
.
mall
.
tradeservice
.
service
.
order
;
yudao-framework/yudao-spring-boot-starter-security/src/main/java/cn/iocoder/yudao/framework/security/config/SecurityProperties.java
浏览文件 @
b1149279
...
...
@@ -16,18 +16,18 @@ public class SecurityProperties {
* HTTP 请求时,访问令牌的请求 Header
*/
@NotEmpty
(
message
=
"Token Header 不能为空"
)
private
String
tokenHeader
;
private
String
tokenHeader
=
"Authorization"
;
/**
* mock 模式的开关
*/
@NotNull
(
message
=
"mock 模式的开关不能为空"
)
private
Boolean
mockEnable
;
private
Boolean
mockEnable
=
false
;
/**
* mock 模式的密钥
* 一定要配置密钥,保证安全性
*/
@NotEmpty
(
message
=
"mock 模式的密钥不能为空"
)
// 这里设置了一个默认值,因为实际上只有 mockEnable 为 true 时才需要配置。
private
String
mockSecret
=
"
yudaoyuanma
"
;
private
String
mockSecret
=
"
test
"
;
}
yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/web/config/WebProperties.java
浏览文件 @
b1149279
package
cn
.
iocoder
.
yudao
.
framework
.
web
.
config
;
import
lombok.AllArgsConstructor
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
org.springframework.boot.context.properties.ConfigurationProperties
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.web.servlet.config.annotation.PathMatchConfigurer
;
...
...
@@ -15,14 +17,16 @@ import javax.validation.constraints.NotNull;
public
class
WebProperties
{
@NotNull
(
message
=
"APP API 不能为空"
)
private
Api
appApi
;
private
Api
appApi
=
new
Api
(
"/app-api"
,
"**.controller.app.**"
)
;
@NotNull
(
message
=
"Admin API 不能为空"
)
private
Api
adminApi
;
private
Api
adminApi
=
new
Api
(
"/admin-api"
,
"**.controller.admin.**"
)
;
@NotNull
(
message
=
"Admin UI 不能为空"
)
private
Ui
adminUi
;
@Data
@AllArgsConstructor
@NoArgsConstructor
@Valid
public
static
class
Api
{
...
...
yudao-module-infra/yudao-module-infra-biz/src/main/resources/application-dev.yaml
浏览文件 @
b1149279
...
...
@@ -65,49 +65,8 @@ jasypt:
---
#################### 定时任务相关配置 ####################
# Quartz 配置项,对应 QuartzProperties 配置类
spring
:
quartz
:
auto-startup
:
true
# 测试环境,需要开启 Job
scheduler-name
:
schedulerName
# Scheduler 名字。默认为 schedulerName
job-store-type
:
jdbc
# Job 存储器类型。默认为 memory 表示内存,可选 jdbc 使用数据库。
wait-for-jobs-to-complete-on-shutdown
:
true
# 应用关闭时,是否等待定时任务执行完成。默认为 false ,建议设置为 true
properties
:
# 添加 Quartz Scheduler 附加属性,更多可以看 http://www.quartz-scheduler.org/documentation/2.4.0-SNAPSHOT/configuration.html 文档
org
:
quartz
:
# Scheduler 相关配置
scheduler
:
instanceName
:
schedulerName
instanceId
:
AUTO
# 自动生成 instance ID
# JobStore 相关配置
jobStore
:
# JobStore 实现类。可见博客:https://blog.csdn.net/weixin_42458219/article/details/122247162
class
:
org.springframework.scheduling.quartz.LocalDataSourceJobStore
isClustered
:
true
# 是集群模式
clusterCheckinInterval
:
15000
# 集群检查频率,单位:毫秒。默认为 15000,即 15 秒
misfireThreshold
:
60000
# misfire 阀值,单位:毫秒。
# 线程池相关配置
threadPool
:
threadCount
:
25
# 线程池大小。默认为 10 。
threadPriority
:
5
# 线程优先级
class
:
org.quartz.simpl.SimpleThreadPool
# 线程池类型
jdbc
:
# 使用 JDBC 的 JobStore 的时候,JDBC 的配置
initialize-schema
:
NEVER
# 是否自动使用 SQL 初始化 Quartz 表结构。这里设置成 never ,我们手动创建表结构。
---
#################### 配置中心相关配置 ####################
# Apollo 配置中心
apollo
:
bootstrap
:
enabled
:
true
# 设置 Apollo 在启动阶段生效
eagerLoad
:
enabled
:
true
# 设置 Apollo 在日志初始化前生效,可以实现日志的动态级别配置
jdbc
:
# 自定义的 JDBC 配置项,用于数据库的地址
dao
:
cn.iocoder.yudao.module.infra.dal.mysql.config.ConfigDAOImpl
url
:
${spring.datasource.dynamic.datasource.master.url}
username
:
${spring.datasource.dynamic.datasource.master.username}
password
:
${spring.datasource.dynamic.datasource.master.password}
---
#################### 服务保障相关配置 ####################
# Lock4j 配置项
...
...
@@ -115,16 +74,6 @@ lock4j:
acquire-timeout
:
3000
# 获取分布式锁超时时间,默认为 3000 毫秒
expire
:
30000
# 分布式锁的超时时间,默认为 30 毫秒
# Resilience4j 配置项
resilience4j
:
ratelimiter
:
instances
:
backendA
:
limit-for-period
:
1
# 每个周期内,允许的请求数。默认为 50
limit-refresh-period
:
60s
# 每个周期的时长,单位:微秒。默认为 500
timeout-duration
:
1s
# 被限流时,阻塞等待的时长,单位:微秒。默认为 5s
register-health-indicator
:
true
# 是否注册到健康监测
---
#################### 监控相关配置 ####################
# Actuator 监控端点的配置项
...
...
@@ -152,50 +101,13 @@ logging:
file
:
name
:
${user.home}/logs/${spring.application.name}.log
# 日志文件名,全路径
---
#################### 微信公众号相关配置 ####################
wx
:
# 参见 https://github.com/Wechat-Group/WxJava/blob/develop/spring-boot-starters/wx-java-mp-spring-boot-starter/README.md 文档
mp
:
# 公众号配置(必填)
app-id
:
wx041349c6f39b268b
secret
:
5abee519483bc9f8cb37ce280e814bd0
# 存储配置,解决 AccessToken 的跨节点的共享
config-storage
:
type
:
RedisTemplate
# 采用 RedisTemplate 操作 Redis,会自动从 Spring 中获取
key-prefix
:
wx
# Redis Key 的前缀 TODO 芋艿:解决下 Redis key 管理的配置
http-client-type
:
HttpClient
# 采用 HttpClient 请求微信公众号平台
---
#################### 芋道相关配置 ####################
# 芋道配置项,设置当前项目所有自定义的配置
yudao
:
security
:
token-header
:
Authorization
mock-enable
:
true
mock-secret
:
test
xss
:
enable
:
false
exclude-urls
:
# 如下两个 url,仅仅是为了演示,去掉配置也没关系
-
${spring.boot.admin.context-path}/**
# 不处理 Spring Boot Admin 的请求
-
${management.endpoints.web.base-path}/**
# 不处理 Actuator 的请求
pay
:
pay-notify-url
:
http://niubi.natapp1.cc/api/pay/order/notify
pay-return-url
:
http://niubi.natapp1.cc/api/pay/order/return
refund-notify-url
:
http://niubi.natapp1.cc/api/pay/refund/notify
demo
:
true
# 开启演示模式
justauth
:
enabled
:
true
type
:
DINGTALK
:
# 钉钉
client-id
:
dingvrnreaje3yqvzhxg
client-secret
:
i8E6iZyDvZj51JIb0tYsYfVQYOks9Cq1lgryEjFRqC79P3iJcrxEwT6Qk2QvLrLI
ignore-check-redirect-uri
:
true
WECHAT_ENTERPRISE
:
# 企业微信
client-id
:
wwd411c69a39ad2e54
client-secret
:
1wTb7hYxnpT2TUbIeHGXGo7T0odav1ic10mLdyyATOw
agent-id
:
1000004
ignore-check-redirect-uri
:
true
cache
:
type
:
REDIS
prefix
:
'
social_auth_state:'
# 缓存前缀,目前只对 Redis 缓存生效,默认 JUSTAUTH::STATE::
timeout
:
24h
# 超时时长,目前只对 Redis 缓存生效,默认 3 分钟
yudao-module-infra/yudao-module-infra-biz/src/main/resources/application.yaml
浏览文件 @
b1149279
...
...
@@ -26,28 +26,6 @@ spring:
redis
:
time-to-live
:
1h
# 设置过期时间为 1 小时
# 工作流 Activiti 配置
activiti
:
# 1. false: 默认值,activiti启动时,对比数据库表中保存的版本,如果不匹配。将抛出异常
# 2. true: 启动时会对数据库中所有表进行更新操作,如果表存在,不做处理,反之,自动创建表
# 3. create_drop: 启动时自动创建表,关闭时自动删除表
# 4. drop_create: 启动时,删除旧表,再创建新表
database-schema-update
:
true
# 设置为 false,可通过 sql/activiti.sql 初始化
db-history-used
:
true
# activiti7 默认 false 不生成历史信息表,需手动设置开启
check-process-definitions
:
false
# 设置为 false,禁用 /resources/processes 自动部署 BPMN XML 流程
history-level
:
full
# full:保存历史数据的最高级别,可保存全部流程相关细节,包括流程流转各节点参数
# 工作流 Flowable 配置
flowable
:
# 1. false: 默认值,Flowable 启动时,对比数据库表中保存的版本,如果不匹配。将抛出异常
# 2. true: 启动时会对数据库中所有表进行更新操作,如果表存在,不做处理,反之,自动创建表
# 3. create_drop: 启动时自动创建表,关闭时自动删除表
# 4. drop_create: 启动时,删除旧表,再创建新表
database-schema-update
:
true
# 设置为 false,可通过 https://github.com/flowable/flowable-sql 初始化
db-history-used
:
true
# flowable6 默认 true 生成信息表,无需手动设置
check-process-definitions
:
false
# 设置为 false,禁用 /resources/processes 自动部署 BPMN XML 流程
history-level
:
full
# full:保存历史数据的最高级别,可保存全部流程相关细节,包括流程流转各节点参数
# MyBatis Plus 的配置项
mybatis-plus
:
configuration
:
...
...
@@ -81,12 +59,6 @@ yudao:
version
:
1.0.0
base-package
:
cn.iocoder.yudao.module.infra
web
:
admin-api
:
prefix
:
/admin-api
controller
:
'
**.controller.admin.**'
app-api
:
prefix
:
/app-api
controller
:
'
**.controller.app.**'
admin-ui
:
url
:
http://dashboard.yudao.iocoder.cn
# Admin 管理后台 UI 的地址
swagger
:
...
...
@@ -94,39 +66,17 @@ yudao:
description
:
提供管理员管理的所有功能
version
:
${yudao.info.version}
base-package
:
${yudao.info.base-package}
captcha
:
timeout
:
5m
width
:
160
height
:
60
codegen
:
base-package
:
${yudao.info.base-package}
db-schemas
:
${spring.datasource.dynamic.datasource.master.name}
error-code
:
# 错误码相关配置项
constants-class-list
:
-
cn.iocoder.yudao.module.bpm.enums.ErrorCodeConstants
-
cn.iocoder.yudao.module.infra.enums.ErrorCodeConstants
-
cn.iocoder.yudao.module.member.enums.ErrorCodeConstants
-
cn.iocoder.yudao.module.pay.enums.ErrorCodeConstants
-
cn.iocoder.yudao.module.system.enums.ErrorCodeConstants
tenant
:
# 多租户相关配置项
enable
:
true
ignore-urls
:
-
/admin-api/system/tenant/get-id-by-name
# 基于名字获取租户,不许带租户编号
-
/admin-api/system/captcha/get-image
# 获取图片验证码,和租户无关
-
/admin-api/infra/file/*/get/**
# 获取图片,和租户无关
-
/admin-api/system/sms/callback/*
# 短信回调接口,无法带上租户编号
ignore-tables
:
-
system_tenant
-
system_tenant_package
-
system_dict_data
-
system_dict_type
-
system_error_code
-
system_menu
-
system_sms_channel
-
system_sms_template
-
system_sms_log
-
system_sensitive_word
-
system_oauth2_client
-
infra_codegen_column
-
infra_codegen_table
-
infra_test_demo
...
...
@@ -138,11 +88,5 @@ yudao:
-
infra_job_log
-
infra_job_log
-
infra_data_source_config
sms-code
:
# 短信验证码相关的配置项
expire-times
:
10m
send-frequency
:
1m
send-maximum-quantity-per-day
:
10
begin-code
:
9999
# 这里配置 9999 的原因是,测试方便。
end-code
:
9999
# 这里配置 9999 的原因是,测试方便。
debug
:
false
yudao-module-infra/yudao-module-infra-biz/src/main/resources/bootstrap-local.yaml
浏览文件 @
b1149279
...
...
@@ -99,49 +99,8 @@ jasypt:
---
#################### 定时任务相关配置 ####################
# Quartz 配置项,对应 QuartzProperties 配置类
spring
:
quartz
:
auto-startup
:
false
# 本地开发环境,尽量不要开启 Job
scheduler-name
:
schedulerName
# Scheduler 名字。默认为 schedulerName
job-store-type
:
jdbc
# Job 存储器类型。默认为 memory 表示内存,可选 jdbc 使用数据库。
wait-for-jobs-to-complete-on-shutdown
:
true
# 应用关闭时,是否等待定时任务执行完成。默认为 false ,建议设置为 true
properties
:
# 添加 Quartz Scheduler 附加属性,更多可以看 http://www.quartz-scheduler.org/documentation/2.4.0-SNAPSHOT/configuration.html 文档
org
:
quartz
:
# Scheduler 相关配置
scheduler
:
instanceName
:
schedulerName
instanceId
:
AUTO
# 自动生成 instance ID
# JobStore 相关配置
jobStore
:
# JobStore 实现类。可见博客:https://blog.csdn.net/weixin_42458219/article/details/122247162
class
:
org.springframework.scheduling.quartz.LocalDataSourceJobStore
isClustered
:
true
# 是集群模式
clusterCheckinInterval
:
15000
# 集群检查频率,单位:毫秒。默认为 15000,即 15 秒
misfireThreshold
:
60000
# misfire 阀值,单位:毫秒。
# 线程池相关配置
threadPool
:
threadCount
:
25
# 线程池大小。默认为 10 。
threadPriority
:
5
# 线程优先级
class
:
org.quartz.simpl.SimpleThreadPool
# 线程池类型
jdbc
:
# 使用 JDBC 的 JobStore 的时候,JDBC 的配置
initialize-schema
:
NEVER
# 是否自动使用 SQL 初始化 Quartz 表结构。这里设置成 never ,我们手动创建表结构。
---
#################### 配置中心相关配置 ####################
# Apollo 配置中心
apollo
:
bootstrap
:
enabled
:
true
# 设置 Apollo 在启动阶段生效
eagerLoad
:
enabled
:
true
# 设置 Apollo 在日志初始化前生效,可以实现日志的动态级别配置
jdbc
:
# 自定义的 JDBC 配置项,用于数据库的地址
dao
:
cn.iocoder.yudao.module.infra.dal.mysql.config.ConfigDAOImpl
url
:
${spring.datasource.dynamic.datasource.master.url}
username
:
${spring.datasource.dynamic.datasource.master.username}
password
:
${spring.datasource.dynamic.datasource.master.password}
---
#################### 服务保障相关配置 ####################
# Lock4j 配置项
...
...
@@ -149,16 +108,6 @@ lock4j:
acquire-timeout
:
3000
# 获取分布式锁超时时间,默认为 3000 毫秒
expire
:
30000
# 分布式锁的超时时间,默认为 30 毫秒
# Resilience4j 配置项
resilience4j
:
ratelimiter
:
instances
:
backendA
:
limit-for-period
:
1
# 每个周期内,允许的请求数。默认为 50
limit-refresh-period
:
60s
# 每个周期的时长,单位:微秒。默认为 500
timeout-duration
:
1s
# 被限流时,阻塞等待的时长,单位:微秒。默认为 5s
register-health-indicator
:
true
# 是否注册到健康监测
---
#################### 监控相关配置 ####################
# Actuator 监控端点的配置项
...
...
@@ -187,60 +136,17 @@ logging:
name
:
${user.home}/logs/${spring.application.name}.log
# 日志文件名,全路径
level
:
# 配置自己写的 MyBatis Mapper 打印日志
cn.iocoder.yudao.module.bpm.dal.mysql
:
debug
cn.iocoder.yudao.module.infra.dal.mysql
:
debug
cn.iocoder.yudao.module.pay.dal.mysql
:
debug
cn.iocoder.yudao.module.system.dal.mysql
:
debug
cn.iocoder.yudao.module.tool.dal.mysql
:
debug
cn.iocoder.yudao.module.member.dal.mysql
:
debug
---
#################### 微信公众号相关配置 ####################
wx
:
# 参见 https://github.com/Wechat-Group/WxJava/blob/develop/spring-boot-starters/wx-java-mp-spring-boot-starter/README.md 文档
mp
:
# 公众号配置(必填)
app-id
:
wx041349c6f39b268b
secret
:
5abee519483bc9f8cb37ce280e814bd0
# 存储配置,解决 AccessToken 的跨节点的共享
config-storage
:
type
:
RedisTemplate
# 采用 RedisTemplate 操作 Redis,会自动从 Spring 中获取
key-prefix
:
wx
# Redis Key 的前缀 TODO 芋艿:解决下 Redis key 管理的配置
http-client-type
:
HttpClient
# 采用 HttpClient 请求微信公众号平台
---
#################### 芋道相关配置 ####################
# 芋道配置项,设置当前项目所有自定义的配置
yudao
:
captcha
:
enable
:
false
# 本地环境,暂时关闭图片验证码,方便登录等接口的测试
security
:
token-header
:
Authorization
mock-enable
:
true
mock-secret
:
test
xss
:
enable
:
false
exclude-urls
:
# 如下两个 url,仅仅是为了演示,去掉配置也没关系
-
${spring.boot.admin.context-path}/**
# 不处理 Spring Boot Admin 的请求
-
${management.endpoints.web.base-path}/**
# 不处理 Actuator 的请求
pay
:
pay-notify-url
:
http://niubi.natapp1.cc/api/pay/order/notify
pay-return-url
:
http://niubi.natapp1.cc/api/pay/order/return
refund-notify-url
:
http://niubi.natapp1.cc/api/pay/refund/notify
demo
:
false
# 关闭演示模式
justauth
:
enabled
:
true
type
:
DINGTALK
:
# 钉钉
client-id
:
dingvrnreaje3yqvzhxg
client-secret
:
i8E6iZyDvZj51JIb0tYsYfVQYOks9Cq1lgryEjFRqC79P3iJcrxEwT6Qk2QvLrLI
ignore-check-redirect-uri
:
true
WECHAT_ENTERPRISE
:
# 企业微信
client-id
:
wwd411c69a39ad2e54
client-secret
:
1wTb7hYxnpT2TUbIeHGXGo7T0odav1ic10mLdyyATOw
agent-id
:
1000004
ignore-check-redirect-uri
:
true
cache
:
type
:
REDIS
prefix
:
'
social_auth_state:'
# 缓存前缀,目前只对 Redis 缓存生效,默认 JUSTAUTH::STATE::
timeout
:
24h
# 超时时长,目前只对 Redis 缓存生效,默认 3 分钟
yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/permission/PermissionApi.java
浏览文件 @
b1149279
...
...
@@ -54,6 +54,6 @@ public interface PermissionApi {
* @return 部门数据权限
*/
@GetMapping
(
PREFIX
+
"/get-dept-data-permission"
)
DeptDataPermissionRespDTO
getDeptDataPermission
(
Long
userId
);
DeptDataPermissionRespDTO
getDeptDataPermission
(
@RequestParam
(
"userId"
)
Long
userId
);
}
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/auth/AdminAuthServiceImpl.java
浏览文件 @
b1149279
...
...
@@ -229,7 +229,7 @@ public class AdminAuthServiceImpl implements AdminAuthService {
reqDTO
.
setTraceId
(
TracerUtils
.
getTraceId
());
reqDTO
.
setUserId
(
userId
);
reqDTO
.
setUserType
(
userType
);
if
(
ObjectUtil
.
notEqual
(
getUserTyp
e
(),
userType
))
{
if
(
ObjectUtil
.
equal
(
getUserType
().
getValu
e
(),
userType
))
{
reqDTO
.
setUsername
(
getUsername
(
userId
));
}
else
{
reqDTO
.
setUsername
(
memberService
.
getMemberUserMobile
(
userId
));
...
...
yudao-module-system/yudao-module-system-biz/src/main/resources/application-dev.yaml
浏览文件 @
b1149279
...
...
@@ -68,49 +68,8 @@ jasypt:
---
#################### 定时任务相关配置 ####################
# Quartz 配置项,对应 QuartzProperties 配置类
spring
:
quartz
:
auto-startup
:
true
# 测试环境,需要开启 Job
scheduler-name
:
schedulerName
# Scheduler 名字。默认为 schedulerName
job-store-type
:
jdbc
# Job 存储器类型。默认为 memory 表示内存,可选 jdbc 使用数据库。
wait-for-jobs-to-complete-on-shutdown
:
true
# 应用关闭时,是否等待定时任务执行完成。默认为 false ,建议设置为 true
properties
:
# 添加 Quartz Scheduler 附加属性,更多可以看 http://www.quartz-scheduler.org/documentation/2.4.0-SNAPSHOT/configuration.html 文档
org
:
quartz
:
# Scheduler 相关配置
scheduler
:
instanceName
:
schedulerName
instanceId
:
AUTO
# 自动生成 instance ID
# JobStore 相关配置
jobStore
:
# JobStore 实现类。可见博客:https://blog.csdn.net/weixin_42458219/article/details/122247162
class
:
org.springframework.scheduling.quartz.LocalDataSourceJobStore
isClustered
:
true
# 是集群模式
clusterCheckinInterval
:
15000
# 集群检查频率,单位:毫秒。默认为 15000,即 15 秒
misfireThreshold
:
60000
# misfire 阀值,单位:毫秒。
# 线程池相关配置
threadPool
:
threadCount
:
25
# 线程池大小。默认为 10 。
threadPriority
:
5
# 线程优先级
class
:
org.quartz.simpl.SimpleThreadPool
# 线程池类型
jdbc
:
# 使用 JDBC 的 JobStore 的时候,JDBC 的配置
initialize-schema
:
NEVER
# 是否自动使用 SQL 初始化 Quartz 表结构。这里设置成 never ,我们手动创建表结构。
---
#################### 配置中心相关配置 ####################
# Apollo 配置中心
apollo
:
bootstrap
:
enabled
:
true
# 设置 Apollo 在启动阶段生效
eagerLoad
:
enabled
:
true
# 设置 Apollo 在日志初始化前生效,可以实现日志的动态级别配置
jdbc
:
# 自定义的 JDBC 配置项,用于数据库的地址
dao
:
cn.iocoder.yudao.module.infra.dal.mysql.config.ConfigDAOImpl
url
:
${spring.datasource.dynamic.datasource.master.url}
username
:
${spring.datasource.dynamic.datasource.master.username}
password
:
${spring.datasource.dynamic.datasource.master.password}
---
#################### 服务保障相关配置 ####################
# Lock4j 配置项
...
...
@@ -118,16 +77,6 @@ lock4j:
acquire-timeout
:
3000
# 获取分布式锁超时时间,默认为 3000 毫秒
expire
:
30000
# 分布式锁的超时时间,默认为 30 毫秒
# Resilience4j 配置项
resilience4j
:
ratelimiter
:
instances
:
backendA
:
limit-for-period
:
1
# 每个周期内,允许的请求数。默认为 50
limit-refresh-period
:
60s
# 每个周期的时长,单位:微秒。默认为 500
timeout-duration
:
1s
# 被限流时,阻塞等待的时长,单位:微秒。默认为 5s
register-health-indicator
:
true
# 是否注册到健康监测
---
#################### 监控相关配置 ####################
# Actuator 监控端点的配置项
...
...
@@ -171,10 +120,6 @@ wx: # 参见 https://github.com/Wechat-Group/WxJava/blob/develop/spring-boot-sta
# 芋道配置项,设置当前项目所有自定义的配置
yudao
:
security
:
token-header
:
Authorization
mock-enable
:
true
mock-secret
:
test
xss
:
enable
:
false
exclude-urls
:
# 如下两个 url,仅仅是为了演示,去掉配置也没关系
...
...
yudao-module-system/yudao-module-system-biz/src/main/resources/application-local.yaml
浏览文件 @
b1149279
...
...
@@ -75,49 +75,6 @@ jasypt:
---
#################### 定时任务相关配置 ####################
# Quartz 配置项,对应 QuartzProperties 配置类
spring
:
quartz
:
auto-startup
:
false
# 本地开发环境,尽量不要开启 Job
scheduler-name
:
schedulerName
# Scheduler 名字。默认为 schedulerName
job-store-type
:
jdbc
# Job 存储器类型。默认为 memory 表示内存,可选 jdbc 使用数据库。
wait-for-jobs-to-complete-on-shutdown
:
true
# 应用关闭时,是否等待定时任务执行完成。默认为 false ,建议设置为 true
properties
:
# 添加 Quartz Scheduler 附加属性,更多可以看 http://www.quartz-scheduler.org/documentation/2.4.0-SNAPSHOT/configuration.html 文档
org
:
quartz
:
# Scheduler 相关配置
scheduler
:
instanceName
:
schedulerName
instanceId
:
AUTO
# 自动生成 instance ID
# JobStore 相关配置
jobStore
:
# JobStore 实现类。可见博客:https://blog.csdn.net/weixin_42458219/article/details/122247162
class
:
org.springframework.scheduling.quartz.LocalDataSourceJobStore
isClustered
:
true
# 是集群模式
clusterCheckinInterval
:
15000
# 集群检查频率,单位:毫秒。默认为 15000,即 15 秒
misfireThreshold
:
60000
# misfire 阀值,单位:毫秒。
# 线程池相关配置
threadPool
:
threadCount
:
25
# 线程池大小。默认为 10 。
threadPriority
:
5
# 线程优先级
class
:
org.quartz.simpl.SimpleThreadPool
# 线程池类型
jdbc
:
# 使用 JDBC 的 JobStore 的时候,JDBC 的配置
initialize-schema
:
NEVER
# 是否自动使用 SQL 初始化 Quartz 表结构。这里设置成 never ,我们手动创建表结构。
---
#################### 配置中心相关配置 ####################
# Apollo 配置中心
apollo
:
bootstrap
:
enabled
:
true
# 设置 Apollo 在启动阶段生效
eagerLoad
:
enabled
:
true
# 设置 Apollo 在日志初始化前生效,可以实现日志的动态级别配置
jdbc
:
# 自定义的 JDBC 配置项,用于数据库的地址
dao
:
cn.iocoder.yudao.module.infra.dal.mysql.config.ConfigDAOImpl
url
:
${spring.datasource.dynamic.datasource.master.url}
username
:
${spring.datasource.dynamic.datasource.master.username}
password
:
${spring.datasource.dynamic.datasource.master.password}
---
#################### 服务保障相关配置 ####################
# Lock4j 配置项
...
...
@@ -125,16 +82,6 @@ lock4j:
acquire-timeout
:
3000
# 获取分布式锁超时时间,默认为 3000 毫秒
expire
:
30000
# 分布式锁的超时时间,默认为 30 毫秒
# Resilience4j 配置项
resilience4j
:
ratelimiter
:
instances
:
backendA
:
limit-for-period
:
1
# 每个周期内,允许的请求数。默认为 50
limit-refresh-period
:
60s
# 每个周期的时长,单位:微秒。默认为 500
timeout-duration
:
1s
# 被限流时,阻塞等待的时长,单位:微秒。默认为 5s
register-health-indicator
:
true
# 是否注册到健康监测
---
#################### 监控相关配置 ####################
# Actuator 监控端点的配置项
...
...
@@ -154,8 +101,6 @@ spring:
url
:
http://127.0.0.1:${server.port}/${spring.boot.admin.context-path}
# 设置 Spring Boot Admin Server 地址
instance
:
prefer-ip
:
true
# 注册实例时,优先使用 IP
# Spring Boot Admin Server 服务端的相关配置
context-path
:
/admin
# 配置 Spring
# 日志文件配置
logging
:
...
...
@@ -163,12 +108,7 @@ logging:
name
:
${user.home}/logs/${spring.application.name}.log
# 日志文件名,全路径
level
:
# 配置自己写的 MyBatis Mapper 打印日志
cn.iocoder.yudao.module.bpm.dal.mysql
:
debug
cn.iocoder.yudao.module.infra.dal.mysql
:
debug
cn.iocoder.yudao.module.pay.dal.mysql
:
debug
cn.iocoder.yudao.module.system.dal.mysql
:
debug
cn.iocoder.yudao.module.tool.dal.mysql
:
debug
cn.iocoder.yudao.module.member.dal.mysql
:
debug
---
#################### 微信公众号相关配置 ####################
wx
:
# 参见 https://github.com/Wechat-Group/WxJava/blob/develop/spring-boot-starters/wx-java-mp-spring-boot-starter/README.md 文档
...
...
@@ -189,9 +129,7 @@ yudao:
captcha
:
enable
:
false
# 本地环境,暂时关闭图片验证码,方便登录等接口的测试
security
:
token-header
:
Authorization
mock-enable
:
true
mock-secret
:
test
xss
:
enable
:
false
exclude-urls
:
# 如下两个 url,仅仅是为了演示,去掉配置也没关系
...
...
yudao-module-system/yudao-module-system-biz/src/main/resources/application.yaml
浏览文件 @
b1149279
...
...
@@ -26,28 +26,6 @@ spring:
redis
:
time-to-live
:
1h
# 设置过期时间为 1 小时
# 工作流 Activiti 配置
activiti
:
# 1. false: 默认值,activiti启动时,对比数据库表中保存的版本,如果不匹配。将抛出异常
# 2. true: 启动时会对数据库中所有表进行更新操作,如果表存在,不做处理,反之,自动创建表
# 3. create_drop: 启动时自动创建表,关闭时自动删除表
# 4. drop_create: 启动时,删除旧表,再创建新表
database-schema-update
:
true
# 设置为 false,可通过 sql/activiti.sql 初始化
db-history-used
:
true
# activiti7 默认 false 不生成历史信息表,需手动设置开启
check-process-definitions
:
false
# 设置为 false,禁用 /resources/processes 自动部署 BPMN XML 流程
history-level
:
full
# full:保存历史数据的最高级别,可保存全部流程相关细节,包括流程流转各节点参数
# 工作流 Flowable 配置
flowable
:
# 1. false: 默认值,Flowable 启动时,对比数据库表中保存的版本,如果不匹配。将抛出异常
# 2. true: 启动时会对数据库中所有表进行更新操作,如果表存在,不做处理,反之,自动创建表
# 3. create_drop: 启动时自动创建表,关闭时自动删除表
# 4. drop_create: 启动时,删除旧表,再创建新表
database-schema-update
:
true
# 设置为 false,可通过 https://github.com/flowable/flowable-sql 初始化
db-history-used
:
true
# flowable6 默认 true 生成信息表,无需手动设置
check-process-definitions
:
false
# 设置为 false,禁用 /resources/processes 自动部署 BPMN XML 流程
history-level
:
full
# full:保存历史数据的最高级别,可保存全部流程相关细节,包括流程流转各节点参数
# MyBatis Plus 的配置项
mybatis-plus
:
configuration
:
...
...
@@ -79,12 +57,6 @@ yudao:
version
:
1.0.0
base-package
:
cn.iocoder.yudao.module.system
web
:
admin-api
:
prefix
:
/admin-api
controller
:
'
**.controller.admin.**'
app-api
:
prefix
:
/app-api
controller
:
'
**.controller.app.**'
admin-ui
:
url
:
http://dashboard.yudao.iocoder.cn
# Admin 管理后台 UI 的地址
swagger
:
...
...
@@ -96,22 +68,14 @@ yudao:
timeout
:
5m
width
:
160
height
:
60
codegen
:
base-package
:
${yudao.info.base-package}
db-schemas
:
${spring.datasource.dynamic.datasource.master.name}
error-code
:
# 错误码相关配置项
constants-class-list
:
-
cn.iocoder.yudao.module.bpm.enums.ErrorCodeConstants
-
cn.iocoder.yudao.module.infra.enums.ErrorCodeConstants
-
cn.iocoder.yudao.module.member.enums.ErrorCodeConstants
-
cn.iocoder.yudao.module.pay.enums.ErrorCodeConstants
-
cn.iocoder.yudao.module.system.enums.ErrorCodeConstants
tenant
:
# 多租户相关配置项
enable
:
true
ignore-urls
:
-
/admin-api/system/tenant/get-id-by-name
# 基于名字获取租户,不许带租户编号
-
/admin-api/system/captcha/get-image
# 获取图片验证码,和租户无关
-
/admin-api/infra/file/*/get/**
# 获取图片,和租户无关
-
/admin-api/system/sms/callback/*
# 短信回调接口,无法带上租户编号
ignore-tables
:
-
system_tenant
...
...
@@ -125,17 +89,6 @@ yudao:
-
system_sms_log
-
system_sensitive_word
-
system_oauth2_client
-
infra_codegen_column
-
infra_codegen_table
-
infra_test_demo
-
infra_config
-
infra_file_config
-
infra_file
-
infra_file_content
-
infra_job
-
infra_job_log
-
infra_job_log
-
infra_data_source_config
sms-code
:
# 短信验证码相关的配置项
expire-times
:
10m
send-frequency
:
1m
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论