功能:简化配置文件,将配置迁移到Nacos
功能:简化本地应用配置文件 - 创建Nacos配置文件:消息中心.yaml、rabbitmq.yaml、datasource.yaml、mybatis-plus.yaml、日志ging.yaml - 添加Nacos配置上传说明文档
This commit is contained in:
@@ -0,0 +1,78 @@
|
||||
# MessageHub主配置文件
|
||||
# 此配置文件包含所有子配置的引用
|
||||
|
||||
# Spring配置
|
||||
spring:
|
||||
# RabbitMQ消息队列配置
|
||||
rabbitmq:
|
||||
host: 192.168.5.15
|
||||
port: 5672
|
||||
username: rabbitmq
|
||||
password: 122503wcy....
|
||||
virtual-host: /
|
||||
listener:
|
||||
simple:
|
||||
acknowledge-mode: auto
|
||||
prefetch: 1
|
||||
|
||||
# 数据源配置
|
||||
datasource:
|
||||
type: com.alibaba.druid.pool.DruidDataSource
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
url: jdbc:mysql://192.168.5.15:3306/messagehub?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true
|
||||
username: root
|
||||
password: 122503wcy
|
||||
druid:
|
||||
initial-size: 5
|
||||
min-idle: 5
|
||||
max-active: 20
|
||||
max-wait: 60000
|
||||
time-between-eviction-runs-millis: 60000
|
||||
min-evictable-idle-time-millis: 300000
|
||||
validation-query: SELECT 1
|
||||
test-while-idle: true
|
||||
test-on-borrow: false
|
||||
test-on-return: false
|
||||
pool-prepared-statements: true
|
||||
max-pool-prepared-statement-per-connection-size: 20
|
||||
filters: stat,wall,slf4j
|
||||
connection-properties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000
|
||||
use-global-data-source-stat: true
|
||||
stat-view-servlet:
|
||||
enabled: true
|
||||
url-pattern: /druid/*
|
||||
reset-enable: false
|
||||
login-username: admin
|
||||
login-password: admin
|
||||
allow: ""
|
||||
deny: ""
|
||||
web-stat-filter:
|
||||
enabled: true
|
||||
url-pattern: /*
|
||||
exclusions: "*.js,*.gif,*.jpg,*.png,*.css,*.ico,/druid/*"
|
||||
session-stat-enable: true
|
||||
session-stat-max-count: 1000
|
||||
|
||||
# MyBatis-Plus配置
|
||||
mybatis-plus:
|
||||
mapper-locations: classpath:mapper/*.xml
|
||||
type-aliases-package: com.xiaowang.messagehub.entity
|
||||
configuration:
|
||||
map-underscore-to-camel-case: true
|
||||
log-impl: org.apache.ibatis.logging.log4j2.Log4j2Impl
|
||||
global-config:
|
||||
db-config:
|
||||
id-type: auto
|
||||
logic-delete-field: deleted
|
||||
logic-delete-value: 1
|
||||
logic-not-delete-value: 0
|
||||
|
||||
# 日志配置
|
||||
logging:
|
||||
config: classpath:log4j2.xml
|
||||
file:
|
||||
path: ./logs
|
||||
|
||||
# 服务器配置
|
||||
server:
|
||||
port: 8080
|
||||
Reference in New Issue
Block a user