新版仿ok交易所-后端
yml
zyy
2026-02-27 592366eac2ae11c99966c5745c3d6d4e4e351602
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
server:
  port: 8235
spring:
  datasource:
#    url: jdbc:mysql://127.0.0.1:6306/8.4?allowMultiQueries=true&useSSL=false&useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&zeroDateTimeBehavior=convertToNull&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true&serverTimezone=Asia/Tokyo&useLegacyDatetimeCode=false
    url: jdbc:mysql://127.0.0.1:3306/trading_order?allowMultiQueries=true&useSSL=false&useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&zeroDateTimeBehavior=convertToNull&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true&serverTimezone=Asia/Tokyo&useLegacyDatetimeCode=false
    username: trading_order
    password: dzptt5sWi6y6p4Fs
    driver-class-name: com.mysql.cj.jdbc.Driver
    type: com.zaxxer.hikari.HikariDataSource
    hikari:
      minimum-idle: 10  # 最小空闲连接数,建议与max-pool-size差距不要太大(避免频繁创建/销毁连接)
      maximum-pool-size: 100  # 提高最大连接数(根据数据库能承受的并发连接数调整,需与DBA确认)
      idle-timeout: 60000  # 空闲连接超时时间(1分钟),超过后释放
      auto-commit: true
      max-lifetime: 1800000  # 连接最大存活时间(30分钟),避免长期占用导致的僵死连接
      connection-timeout: 30000  # 延长连接获取超时时间(30秒,避免因短暂峰值误报)
      connection-test-query: SELECT 1  # 连接校验SQL(检测连接是否有效,MySQL示例,其他数据库需调整)
      validation-timeout: 5000  # 连接校验超时时间(5秒)
  jpa:
    properties:
      hibernate:
        jdbc:
          time_zone: Asia/Tokyo
  jackson:
    time-zone: Asia/Tokyo
    cache:
      type: redis
      redis:
        cache-null-values: true
  redis:
    redisson:
      config: classpath:redisson/redisson-dev.yml
logging:
  config: classpath:logback/logback-prod.xml
 
jetcache:
  statIntervalMinutes: 1
  default: # 默认default,可以配置更多的area
    type: linkedhashmap # 已支持可选:linkedhashmap、caffeine
    keyConvertor: fastjson # key转换器
  remote:
    default:
      # 缓存类型。tair、redis为当前支持的远程缓存
      type: redis
      keyConvertor: fastjson
      # 采用Java序列化存储
      valueEncoder: java
      valueDecoder: java
      poolConfig:
        minIdle: 5
        maxIdle: 20
        maxTotal: 50
      host: 127.0.0.1
      port: 6379