2
0

feat: support load application yaml

This commit is contained in:
zhangsz
2025-01-17 11:13:41 +08:00
parent e682b8e7e6
commit 2bb8cdfa50
10 changed files with 239 additions and 31 deletions

View File

@@ -0,0 +1,158 @@
# spring配置
spring:
application:
name: wfc-payment
cloud:
nacos:
discovery:
server-addr: ${NACOS_SERVER_ADDR:wfc-nacos}:${NACOS_SERVER_PORT:8848}
namespace: ${NACOS_NAME_SPACE:wfc-prod}
main:
allow-bean-definition-overriding: true
redis:
host: wfc-redis
port: 6379
password:
datasource:
druid:
stat-view-servlet:
enabled: true
loginUsername: admin
loginPassword: 123456
dynamic:
druid:
initial-size: 5
min-idle: 5
maxActive: 20
maxWait: 60000
connectTimeout: 30000
socketTimeout: 60000
timeBetweenEvictionRunsMillis: 60000
minEvictableIdleTimeMillis: 300000
validationQuery: SELECT 1 FROM DUAL
testWhileIdle: true
testOnBorrow: false
testOnReturn: false
poolPreparedStatements: true
maxPoolPreparedStatementPerConnectionSize: 20
filters: stat,slf4j
connectionProperties: druid.stat.mergeSql\=true;druid.stat.slowSqlMillis\=5000
datasource:
# 主库数据源
master:
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://wfc-mysql:3306/wfc_user_db?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
username: root
password: 123456
# 从库数据源
# slave:
# username:
# password:
# url:
# driver-class-name:
config:
import: optional:classpath:application-common.yml
# mybatis-plus配置
mybatis-plus:
# 搜索指定包别名
type-aliases-package: org.wfc.system
# 配置mapper的扫描找到所有的mapper.xml映射文件
mapper-locations: classpath:mapper/**/*.xml
global-config:
db-config:
logic-delete-field: del_flag
logic-delete-value: 1
logic-not-delete-value: 0
# swagger configuration
swagger:
title: payment modules api
license: Powered By wfc
licenseUrl: https://wfc.vip
logging:
level:
root: DEBUG
org:
springframework: DEBUG
mybatis:
mapper: DEBUG
com:
github:
binarywang: DEBUG
file:
name: /opt/wfc/logs/wfc-payment.log
wxpay:
appId: 121412414112
mchId: 1131412414
mchKey: 1525342aa
subAppId: #服务商模式下的子商户公众账号ID
subMchId: #服务商模式下的子商户号
keyPath: /opt/wfc/conf/cert/wxpay/wfc-wxpay.pem
useSandboxEnv: false
alipay:
appId: 121412414112
privateKey: 1131412414
publicKey: 1525342aa
notifyUrl: http://wfc-gateway:${GATEWAY_SERVER_PORT:8080}/alipay/notify
returnUrl: http://wfc-gateway:${GATEWAY_SERVER_PORT:8080}/alipay/return
signType: RSA2
charset: utf-8
gatewayUrl: https://openapi.alipaydev.com/gateway.do
logPath: /opt/wfc/logs/alipay/alipay_log.txt
maxQueryRetry: 5
queryDuration: 5
maxCancelRetry: 3
cancelDuration: 2
heartbeatDelay: 5
heartbeatDuration: 5
storeId:
storeName:
supportEmail:
supportPhone:
ccpay:
url: https://api.paymentgateway.com/v1/payments
apiKey: api-key-from-yml
merchantId: merchant-id-from-yml
currency: USD
timeout: 30
callbackUrl: https://wfc-gateway:${GATEWAY_SERVER_PORT:8080}/payment/callback
unionpay:
merId: 700000000000001
keyPrivateCert: /opt/wfc/conf/cert/unionpay/wfc-root.pfx
keyPrivateCertPwd: 123456
signCertType: PKCS12
encryptCertPath: /opt/wfc/conf/cert/unionpay/wfc-root.cer
acpMiddleCert: /opt/wfc/conf/cert/unionpay/wfc-middle.cer
acpRootCert: /opt/wfc/conf/cert/unionpay/wfc-root.cer
certSign: true
frontUrl: https://gateway.test.95516.com/gateway/api/frontTransReq.do
backUrl: http://wfc-gateway:${GATEWAY_SERVER_PORT:8080}/unionpay/notify
signMethod: 01
version: 5.1.0
channelType: 07
accessType: 0
currencyCode: 156
bizType: 000201
txnType: 01
txnSubType: 01
payTimeout: 30
queryTimeout: 30
refundTimeout: 30
frontFailUrl: http://wfc-gateway:${GATEWAY_SERVER_PORT:8080}/unionpay/fail
frontSuccessUrl: http://wfc-gateway:${GATEWAY_SERVER_PORT:8080}/unionpay/success
frontBackUrl: http://wfc-gateway:${GATEWAY_SERVER_PORT:8080}/unionpay/front
backBackUrl: http://wfc-gateway:${GATEWAY_SERVER_PORT:8080}/unionpay/back
frontNotifyUrl: http://wfc-gateway:${GATEWAY_SERVER_PORT:8080}/unionpay/front/notify
backNotifyUrl: http://wfc-gateway:${GATEWAY_SERVER_PORT:8080}/unionpay/back/notify
refundNotifyUrl: http://wfc-gateway:${GATEWAY_SERVER_PORT:8080}/unionpay/refund/notify
queryNotifyUrl: http://wfc-gateway:${GATEWAY_SERVER_PORT:8080}/unionpay/query/notify
refundSuccessUrl: http://wfc-gateway:${GATEWAY_SERVER_PORT:8080}/unionpay/refund/success
refundFailUrl: http://wfc-gateway:${GATEWAY_SERVER_PORT:8080}/unionpay/refund/fail
querySuccessUrl: