62 lines
2.3 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

server:
port: 18090
spring:
application:
name: ai-china-southern-power-grid
datasource:
type: com.zaxxer.hikari.HikariDataSource
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://127.0.0.1:3306/south_power_grid?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true
username: root
password: 123456 # Nfdw@202510
hikari:
connection-timeout: 30000
validation-timeout: 5000
minimum-idle: 10
maximum-pool-size: 20
idle-timeout: 600000
max-lifetime: 900000
keepaliveTime: 30000
servlet:
multipart:
enabled: true
max-file-size: 100MB # 单个文件最大 默认1M
max-request-size: 100MB # 整个请求最大 默认10M
# 自定义本地文件存储路径(绝对路径,不要放在项目里!)
file:
upload:
path: D:/springboot-uploads/excel/ # Windows
pdf-path: D:/springboot-uploads/pdf/ # Windows
# path: /home/springboot/uploads/excel/ # Linux
# pdf-path: /home/springboot/uploads/pdf/ # Linux
import:
batch-size: 500 # 批量导入大小
# MyBatis-Plus配置
mybatis-plus:
configuration:
map-underscore-to-camel-case: true
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
global-config:
db-config:
id-type: auto
table-underline: true
mapper-locations: classpath*:mapper/**/*.xml
type-aliases-package: com.jinshan.mybatistest.entity
# 自定义线程池配置(用于分时停电事件表数据同步到日K线停电事件表)
async:
thread-pool:
core-pool-size: 10 # 核心线程数(常驻线程)
max-pool-size: 20 # 最大线程数(处理突发流量)
queue-capacity: 1000 # 阻塞队列容量根据业务响应时间要求设置过大容易OOM
keep-alive-seconds: 60 # 空闲线程存活时间(秒),实现线程回收
await-termination-seconds: 60 # 优雅停机:等待任务完成的最大时长(秒)
# 定时任务配置
schedule:
weather-data-sync: "0 20 * * * ?" # 区域天气数据同步任务每小时第20分钟执行
outage-state-set: "0 0 0 * * ?" # 设置已复电状态任务:每天凌晨执行