# ============================================================
|
# 打包用「进 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
|