diff --git a/trade-service-project/trade-service-integration-test/pom.xml b/trade-service-project/trade-service-integration-test/pom.xml deleted file mode 100644 index 803cdda9..00000000 --- a/trade-service-project/trade-service-integration-test/pom.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - - trade-service-project - cn.iocoder.mall - 1.0-SNAPSHOT - - 4.0.0 - - trade-service-integration-test - - - - cn.iocoder.mall - trade-service-app - 1.0-SNAPSHOT - - - - - org.springframework.boot - spring-boot-starter-test - test - - - - diff --git a/trade-service-project/trade-service-integration-test/src/test/java/cn/iocoder/mall/tradeservice/service/order/impl/TradeOrderServiceImplTest.java b/trade-service-project/trade-service-integration-test/src/test/java/cn/iocoder/mall/tradeservice/service/order/impl/TradeOrderServiceImplTest.java deleted file mode 100644 index bde384ae..00000000 --- a/trade-service-project/trade-service-integration-test/src/test/java/cn/iocoder/mall/tradeservice/service/order/impl/TradeOrderServiceImplTest.java +++ /dev/null @@ -1,34 +0,0 @@ -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); - } - -} diff --git a/trade-service-project/trade-service-integration-test/src/test/java/cn/iocoder/mall/tradeservice/service/order/package-info.java b/trade-service-project/trade-service-integration-test/src/test/java/cn/iocoder/mall/tradeservice/service/order/package-info.java deleted file mode 100644 index fc14f6ab..00000000 --- a/trade-service-project/trade-service-integration-test/src/test/java/cn/iocoder/mall/tradeservice/service/order/package-info.java +++ /dev/null @@ -1 +0,0 @@ -package cn.iocoder.mall.tradeservice.service.order; diff --git a/yudao-framework/yudao-spring-boot-starter-security/src/main/java/cn/iocoder/yudao/framework/security/config/SecurityProperties.java b/yudao-framework/yudao-spring-boot-starter-security/src/main/java/cn/iocoder/yudao/framework/security/config/SecurityProperties.java index a9373cd9..9d5f6459 100644 --- a/yudao-framework/yudao-spring-boot-starter-security/src/main/java/cn/iocoder/yudao/framework/security/config/SecurityProperties.java +++ b/yudao-framework/yudao-spring-boot-starter-security/src/main/java/cn/iocoder/yudao/framework/security/config/SecurityProperties.java @@ -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"; } diff --git a/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/web/config/WebProperties.java b/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/web/config/WebProperties.java index 173a6704..03f4d70b 100644 --- a/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/web/config/WebProperties.java +++ b/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/web/config/WebProperties.java @@ -1,6 +1,8 @@ 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 { diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/resources/application-dev.yaml b/yudao-module-infra/yudao-module-infra-biz/src/main/resources/application-dev.yaml index d8dc4a42..2a8fdd2f 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/resources/application-dev.yaml +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/resources/application-dev.yaml @@ -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 分钟 diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/resources/application.yaml b/yudao-module-infra/yudao-module-infra-biz/src/main/resources/application.yaml index 7f09a652..aa2d7980 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/resources/application.yaml +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/resources/application.yaml @@ -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 diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/resources/bootstrap-local.yaml b/yudao-module-infra/yudao-module-infra-biz/src/main/resources/bootstrap-local.yaml index 47d6eff1..66852b52 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/resources/bootstrap-local.yaml +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/resources/bootstrap-local.yaml @@ -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 分钟 - diff --git a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/permission/PermissionApi.java b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/permission/PermissionApi.java index 4a7be044..a3410149 100644 --- a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/permission/PermissionApi.java +++ b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/permission/PermissionApi.java @@ -54,6 +54,6 @@ public interface PermissionApi { * @return 部门数据权限 */ @GetMapping(PREFIX + "/get-dept-data-permission") - DeptDataPermissionRespDTO getDeptDataPermission(Long userId); + DeptDataPermissionRespDTO getDeptDataPermission(@RequestParam("userId") Long userId); } diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/auth/AdminAuthServiceImpl.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/auth/AdminAuthServiceImpl.java index 03f60011..5264cae2 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/auth/AdminAuthServiceImpl.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/auth/AdminAuthServiceImpl.java @@ -229,7 +229,7 @@ public class AdminAuthServiceImpl implements AdminAuthService { reqDTO.setTraceId(TracerUtils.getTraceId()); reqDTO.setUserId(userId); reqDTO.setUserType(userType); - if (ObjectUtil.notEqual(getUserType(), userType)) { + if (ObjectUtil.equal(getUserType().getValue(), userType)) { reqDTO.setUsername(getUsername(userId)); } else { reqDTO.setUsername(memberService.getMemberUserMobile(userId)); diff --git a/yudao-module-system/yudao-module-system-biz/src/main/resources/application-dev.yaml b/yudao-module-system/yudao-module-system-biz/src/main/resources/application-dev.yaml index 52eb7275..577c2011 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/resources/application-dev.yaml +++ b/yudao-module-system/yudao-module-system-biz/src/main/resources/application-dev.yaml @@ -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,仅仅是为了演示,去掉配置也没关系 diff --git a/yudao-module-system/yudao-module-system-biz/src/main/resources/application-local.yaml b/yudao-module-system/yudao-module-system-biz/src/main/resources/application-local.yaml index 33dee94b..9d696bf9 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/resources/application-local.yaml +++ b/yudao-module-system/yudao-module-system-biz/src/main/resources/application-local.yaml @@ -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,仅仅是为了演示,去掉配置也没关系 diff --git a/yudao-module-system/yudao-module-system-biz/src/main/resources/application.yaml b/yudao-module-system/yudao-module-system-biz/src/main/resources/application.yaml index 8ebe490f..0346a1c5 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/resources/application.yaml +++ b/yudao-module-system/yudao-module-system-biz/src/main/resources/application.yaml @@ -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