92 lines
2.2 KiB
YAML
92 lines
2.2 KiB
YAML
# =========================================
|
|
# Order Service 配置
|
|
# 订单服务 - 分布式事务发起方
|
|
# =========================================
|
|
|
|
server:
|
|
port: 8081
|
|
|
|
spring:
|
|
application:
|
|
name: order-service
|
|
datasource:
|
|
driver-class-name: com.mysql.cj.jdbc.Driver
|
|
url: jdbc:mysql://localhost:3306/order_db?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true
|
|
username: root
|
|
password: root123
|
|
hikari:
|
|
maximum-pool-size: 20
|
|
minimum-idle: 5
|
|
connection-timeout: 30000
|
|
idle-timeout: 600000
|
|
max-lifetime: 1800000
|
|
cloud:
|
|
nacos:
|
|
discovery:
|
|
enabled: true
|
|
server-addr: ${NACOS_SERVER:localhost:8848}
|
|
namespace: ${NACOS_NAMESPACE:public}
|
|
config:
|
|
enabled: true
|
|
server-addr: ${NACOS_SERVER:localhost:8848}
|
|
namespace: ${NACOS_NAMESPACE:public}
|
|
file-extension: yaml
|
|
|
|
# Seata配置
|
|
seata:
|
|
enabled: true
|
|
tx-service-group: default_tx_group
|
|
service:
|
|
vgroup-mapping:
|
|
default_tx_group: default
|
|
grouplist:
|
|
default: 127.0.0.1:8091
|
|
enable-degrade: false
|
|
global-attributes:
|
|
application: order-service
|
|
client:
|
|
rm:
|
|
async-commit-retry-count: 5
|
|
report-success-enable: false
|
|
lock:
|
|
retry-interval: 30
|
|
retry-times: 100
|
|
retry-policy-branch-rollback-on-conflict: true
|
|
tm:
|
|
commit-retry-count: 5
|
|
rollback-retry-count: 5
|
|
undo:
|
|
data-validation: true
|
|
log-serialization: jackson
|
|
log-table: undo_log
|
|
registry:
|
|
type: file
|
|
file:
|
|
name: file.conf
|
|
config:
|
|
type: file
|
|
file:
|
|
name: file.conf
|
|
|
|
# MyBatis-Plus配置
|
|
mybatis-plus:
|
|
mapper-locations: classpath*:/mapper/**/*.xml
|
|
type-aliases-package: com.erp.order.entity
|
|
configuration:
|
|
map-underscore-to-camel-case: true
|
|
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
|
|
global-config:
|
|
db-config:
|
|
id-type: auto
|
|
logic-delete-field: deleted
|
|
logic-delete-value: 1
|
|
logic-not-delete-value: 0
|
|
|
|
# 日志配置
|
|
logging:
|
|
level:
|
|
com.erp.order: DEBUG
|
|
io.seata: DEBUG
|
|
pattern:
|
|
console: '%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n'
|