Files
MTKJPAY/mt-pay/src/main/resources/application-prod.yml
qiube a3633577b4 feat(config): 更新配置以支持HTTPS域名访问
- 将所有环境的前端URL从localhost和IP地址更新为https://shopd.mtkj2025.com
- 配置PayPal webhook使用HTTPS域名以满足PayPal安全要求
- 统一后端服务端口从18082调整为8082
- 更新Java代码中的默认URL配置和启动日志信息
- 创建域名配置、Nginx SSL配置和公网访问检查清单文档
- 为商品链接生成和API访问配置HTTPS协议支持
2025-12-26 15:18:34 +08:00

107 lines
3.4 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.
spring:
datasource:
type: com.alibaba.druid.pool.DruidDataSource
driver-class-name: com.mysql.cj.jdbc.Driver
druid:
# 主库数据源(生产环境)
master:
url: ${prod.db.url}
username: ${prod.db.username}
password: ${prod.db.password}
# 初始连接数
initial-size: 5
# 最小连接池数量
min-idle: 10
# 最大连接池数量
max-active: 200
# 配置获取连接等待超时的时间
max-wait: 60000
# 配置连接超时时间
connect-timeout: 30000
# 配置网络超时时间
socket-timeout: 60000
# 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
time-between-eviction-runs-millis: 60000
# 配置一个连接在池中最小生存的时间,单位是毫秒
min-evictable-idle-time-millis: 300000
# 配置一个连接在池中最大生存的时间,单位是毫秒
max-evictable-idle-time-millis: 900000
# 配置检测连接是否有效
validation-query: SELECT 1 FROM DUAL
test-while-idle: true
test-on-borrow: false
test-on-return: false
# 从库数据源
slave:
# 从数据源开关/默认关闭
enabled: false
url:
username:
password:
# Druid监控配置
web-stat-filter:
enabled: true
stat-view-servlet:
enabled: true
# 设置白名单,不填则允许所有访问
allow:
url-pattern: /druid/*
# 控制台管理用户名和密码
login-username: ruoyi
login-password: 123456
filter:
stat:
enabled: true
# 慢SQL记录
log-slow-sql: false
slow-sql-millis: 1000
merge-sql: true
wall:
config:
multi-statement-allow: true
# 服务器配置
server:
port: ${server.port:8082}
servlet:
context-path: /
multipart:
max-file-size: 10MB
max-request-size: 50MB
file-size-threshold: 2MB
# 应用配置
app:
# 前端访问地址已配置SSL证书使用HTTPS和域名
frontend:
url: ${app.frontend.url:https://shopd.mtkj2025.com}
# PingPong支付配置生产环境
pingpong:
client-id: ${pingpong.client-id}
acc-id: ${pingpong.acc-id}
secret: ${pingpong.secret}
sign-type: MD5
gateway: https://acquirer-payment.pingpongx.com
mode: build
enabled: false
# PayPal支付配置生产环境
# 注意:当前为测试环境,使用沙箱凭证
# 正式环境需要替换为生产环境的Client ID和Secret
paypal:
# PayPal Client IDAPI密钥- 从环境变量或配置中心获取
client-id: AdGYUZpvLuHR30dybOApvM-RNB1pVKtd74SVfh-6TK52xV-1JEBddHVMCWuDdyyHri4DXd4kABBi7Icb
# PayPal Client Secret密钥- 从环境变量或配置中心获取
client-secret: ENblspyRmwsOU_PWFurlhEYUF5Da6aYKl0pjK4ehm7p3R5aSqvbpaF_YsIIs8v0ty1c9WJu15XP-Fe_1
# 环境模式sandbox沙箱或 production生产
# 当前为测试环境使用sandbox
mode: sandbox
# 是否启用PayPal支付
enabled: true
# Webhook URL已配置SSL证书使用HTTPS和域名
webhook-url: ${paypal.webhook-url:https://shopd.mtkj2025.com/api/paypal/webhook}
# Webhook ID从PayPal控制台获取
webhook-id: ${paypal.webhook-id:}