xyc
12 小时以前 8ad75d5872872b79abada58589adad0df4614db6
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
# ============================================================
# 打包用「进 jar 的默认配置」——只允许占位符,禁止真实密钥/口令!
#
# pack-deploy.ps1 构建前会用本文件临时替换
#   traffic-audit-server/src/main/resources/application.yml
# 构建完成(含去密自检)后自动还原开发机的真实配置。
#
# 部署机真实值由下面两种方式覆盖,优先级 环境变量 > jar 同级 application.yml > 本文件:
#   1) jar 同级(启动工作目录)放 application.yml,见 deploy-templates/backend/application.yml
#   2) 环境变量 TRAFFIC_DB_URL / TRAFFIC_DB_USER / TRAFFIC_DB_PASSWORD /
#      TRAFFIC_JWT_SECRET / DEEPSEEK_API_KEY
#
# 注意:password 默认值为空串,若部署机既没有外置 application.yml 也没设
# TRAFFIC_DB_PASSWORD,启动会报 java.sql.SQLException: Access denied ... (using password: NO)
# ============================================================
server:
  port: 8090
  tomcat:
    basedir: .
    threads:
      max: 500
    accesslog:
      enabled: true
      directory: logs
      prefix: access
      suffix: .log
      pattern: '%h %l %u %t "%r" %s %b %D'
 
spring:
  web:
    resources:
      static-locations: file:./web/,classpath:/static/
  datasource:
    url: ${TRAFFIC_DB_URL:jdbc:mysql://127.0.0.1:3306/traffic_audit?useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai&useSSL=false&allowPublicKeyRetrieval=true&rewriteBatchedStatements=true}
    username: ${TRAFFIC_DB_USER:root}
    password: ${TRAFFIC_DB_PASSWORD:}
    driver-class-name: com.mysql.cj.jdbc.Driver
  servlet:
    multipart:
      max-file-size: 100MB
      max-request-size: 100MB
  jackson:
    date-format: yyyy-MM-dd HH:mm:ss
    time-zone: Asia/Shanghai
 
mybatis-plus:
  mapper-locations: classpath*:/mapper/**/*.xml
  type-aliases-package: com.trafficaudit
  configuration:
    map-underscore-to-camel-case: true
    # 显式指定 Slf4j:MyBatis-Plus 默认 StdOutImpl 会把整行数据(含企业名/电话)打进日志
    log-impl: org.apache.ibatis.logging.slf4j.Slf4jImpl
  global-config:
    db-config:
      id-type: auto
      logic-delete-field: deleted
      logic-delete-value: 1
      logic-not-delete-value: 0
 
jwt:
  secret: ${TRAFFIC_JWT_SECRET:8f2c1d64a7b34e09c5d81f6a2b0e7c93}
  expiration: 86400000
 
docs:
  template-root: docs
 
city-passenger:
  template-dir: docs/城市客运
 
passenger:
  template-dir: docs/公路旅客
 
freight:
  template-dir: docs/货运
 
energy:
  template-dir: docs/能耗
 
investment:
  template-dir: docs/投资/模板
 
summary:
  template-dir: docs/生成汇总大表
 
deepseek:
  api-key: ${DEEPSEEK_API_KEY:}
  api-url: https://api.deepseek.com/v1/chat/completions
  model: deepseek-chat
 
app:
  cors:
    allowed-origins: http://localhost:*,http://127.0.0.1:*,http://192.168.*:*,http://10.*:*,http://172.*:*
  captcha:
    required: false