diff --git a/data/src/test/resources/application-test.yml b/data/src/test/resources/application-test.yml index 8f46148f..6eed8521 100644 --- a/data/src/test/resources/application-test.yml +++ b/data/src/test/resources/application-test.yml @@ -1,28 +1,166 @@ spring: + application: + name: data datasource: - # 直接连接PostgreSQL数据库进行单元测试 - url: jdbc:postgresql://192.168.65.161:25432/spdm?currentSchema=public&stringtype=unspecified - driver-class-name: org.postgresql.Driver username: spdm password: Spdm@2026 + jdbc-url: jdbc:postgresql://192.168.65.161:25432/spdm?currentSchema=public&stringtype=unspecified + driver-class-name: com.mysql.cj.jdbc.Driver hikari: - maximum-pool-size: 5 - minimum-idle: 2 - connection-timeout: 30000 + # 设置连接池能够容纳的最大连接数。建议值:CPU核心数 * 2 + 有效磁盘I/O数。一个常见的经验值是 10-20。 + maximum-pool-size: 20 + # 连接池在空闲时保持的最小连接数。 + minimum-idle: 5 + # 一个连接在被标记为空闲之前可以保持空闲状态的最长时间(毫秒)。当连接的空闲时间超过此值后,它可能会被连接池 evict(驱逐)。 + idle-timeout: 60000 # 1 min + # 一个连接从被创建开始,其生命周期的最大时长(毫秒)。HikariCP的默认值就是30分钟,这是一个非常合理的设置。 + max-lifetime: 1800000 # 30 min(Hikari 默认) + # 应用程序尝试从连接池获取一个连接时,等待的最长时间(毫秒)。建议值:30-60秒。 + connection-timeout: 30000 # 30s + master: + username: spdm + password: Spdm@2026 + jdbc-url: jdbc:postgresql://192.168.65.161:25432/spdm?currentSchema=public&stringtype=unspecified + driver-class-name: com.mysql.cj.jdbc.Driver + slave: + username: root + password: mysql + jdbc-url: jdbc:mysql://192.168.65.161:3306/spdm_baseline?useUnicode=true&characterEncoding=utf-8&useSSL=true&serverTimezone=Asia/Shanghai + driver-class-name: com.mysql.cj.jdbc.Driver + enable: true + servlet: + multipart: + # 单个文件的最大值 + max-file-size: 500MB + # 上传文件总的最大值 + max-request-size: 10240MB mybatis-plus: - mapper-locations: classpath*:/mapper/**/*.xml configuration: - map-underscore-to-camel-case: false + map-underscore-to-camel-case: true + auto-mapping-behavior: full log-impl: org.apache.ibatis.logging.stdout.StdOutImpl + # cache-enabled: true + mapper-locations: classpath*:mapper/**/*.xml global-config: + # 逻辑删除配置 db-config: - id-type: auto - logic-delete-value: 1 - logic-not-delete-value: 0 + # 删除前 + logic-not-delete-value: 1 + # 删除后 + logic-delete-value: 0 +# MyBatis SQL日志配置 logging: level: - com.sdm.data: DEBUG - org.springframework.jdbc: DEBUG - org.apache.ibatis: DEBUG + com.baomidou.mybatisplus.core.MybatisConfiguration: debug + com.baomidou.mybatisplus.core.override.MybatisMapperRegistry: trace + com.sdm.data.mapper: debug + java.sql: debug + java.sql.Connection: debug + java.sql.Statement: debug + java.sql.PreparedStatement: debug + +lombok: + anyConstructor: + addConstructorProperties: true + +file: + rootPath: /data/home/sdm + privatePath: /data/home + scriptPath : /opt/script + +#logging: +# config: ./config/logback.xml + +# 配置文件系统类型 +fileSystem: + minio: minio + system: system + chose: minio # 这里选择minio或者system + +#地址: https://play.min.io +#凭据: +#账号: minioadmin / 密码: minioadmin +#特点: +#由 MinIO 官方提供,用于演示和测试。 +#公开可访问,但数据可能定期清理。 +#支持 S3 API,适合快速验证代码 +minio: + endpoint: 192.168.65.161 + port: 9000 + access-key: minioadmin + secret-key: minioadmin + secure: false + secret-business-bucket: secretbusiness # 存放保密业务代码、脚本的桶(仅超级管理员访问) + spdm-bucket: spdm # 普通业务数据桶(分配给用户读写权限) + directMemory: 16384 # 16kb + + +management: + endpoints: + web: + exposure: + include: health,info + endpoint: + health: + show-details: always + group: + readiness: + include: discoveryComposite,ping,refreshScope + health: + redis: + enabled: false + db: + enabled: false + +security: + whitelist: + paths: + - /data/previewImage + - /data/approveDataFile + - /data/downloadFile + - /data/flowableUpFileToLocal + - /data/flowableUpFileToLocalMerge + - /data/getFileBaseInfo + - /data/uploadFiles + - /data/initNewTenant + +data: + storage-monitor: + cron: 0 0 0/1 * * ? + +# 0单机处理,可以指向本地,1负载均衡轮询 +serverType: 0 +#serverIp: 192.168.65.161 +serverIp: 192.168.65.73 + +# xxljob 配置开始 +# xxl-job admin address list, such as "http://address" or "http://address01,http://address02" +xxl: + job: + admin: + # 调度中心地址列表 + addresses: http://127.0.0.1:7110/xxl-job-admin + # 调度中心访问令牌 + accessToken: default_token + # xxl-job 超时时间(秒),默认3秒 + timeout: 3 + executor: + # 执行器是否启用,默认true + enabled: true + # 执行器应用名称 服务名-job-executor + appname: data-job-executor + # 执行器注册地址:默认使用address注册,若为null则使用ip:port注册 + address: + # 执行器IP + ip: + # 执行器端口,为了好记,web服务端口+1000 + port: 8104 + # 执行器日志路径 + logpath: D:\home\app\pbs\xxljob + # 执行器日志保留天数 + logretentiondays: 14 + # 执行器排除扫描的包,多个用逗号分隔,如 "org.package01" 或 "org.package01,org.package02" + excludedpackage: +# xxljob 配置结束 \ No newline at end of file