70 lines
1.9 KiB
YAML

server:
port: 8100
spring:
application:
name: fund-sys
cloud:
nacos:
discovery:
server-addr: localhost:8848
namespace: fund-platform
group: DEFAULT_GROUP
datasource:
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://localhost:3306/fund_sys?useUnicode=true&characterEncoding=utf8&serverTimezone=Asia/Shanghai
username: root
password: zjf@123456
hikari:
# 连接池大小配置
maximum-pool-size: 20 # 最大连接数(建议: CPU核心数*2 + 有效磁盘数)
minimum-idle: 5 # 最小空闲连接数
# 连接超时配置
connection-timeout: 30000 # 连接超时时间(毫秒)
idle-timeout: 600000 # 空闲连接超时时间(10分钟)
max-lifetime: 1800000 # 连接最大存活时间(30分钟)
# 连接验证配置
validation-timeout: 5000 # 连接验证超时时间
leak-detection-threshold: 60000 # 连接泄露检测阈值(60秒)
# 连接池名称
pool-name: FundSysHikariPool
# 连接初始化SQL
connection-init-sql: SELECT 1
# Redis配置
data:
redis:
host: localhost
port: 6379
password: zjf@123456
database: 0
timeout: 10000
lettuce:
pool:
max-active: 8
max-wait: -1
max-idle: 8
min-idle: 0
mybatis-plus:
mapper-locations: classpath*:/mapper/**/*.xml
type-aliases-package: com.fundplatform.sys.data.entity
configuration:
map-underscore-to-camel-case: true
cache-enabled: false
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
global-config:
db-config:
logic-delete-field: deleted
logic-delete-value: 1
logic-not-delete-value: 0
logging:
level:
com.fundplatform.sys: DEBUG
pattern:
console: "%d{yyyy-MM-dd HH:mm:ss} [%thread] %-5level %logger{36} - %msg%n"