2
0

feat: use application.yml to config

This commit is contained in:
zhangsz
2024-12-31 19:51:03 +08:00
parent 5c3a3cd6f0
commit 833d089cb8
6 changed files with 210 additions and 10 deletions

View File

@@ -0,0 +1,122 @@
# 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:
# 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/config/wxpay/wxpay_key.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