Files
JayuCloud/MessageHub/nacos-config/MessageHub.yaml
T
xiaowang a41985582b 注释优化
短信发送队列优化
邮件发送队列实现
2026-02-11 16:50:46 +08:00

112 lines
2.8 KiB
YAML

# 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
# 短信配置
sms:
# 短信平台选择:spug
platform: spug
# Spug配置
spug:
base-url: https://push.spug.cc
template-id: your-template-id
api-key: your-api-key
# 邮件配置
email:
# 邮件平台选择:gmail 或 qqmail
platform: gmail
# Gmail配置
gmail:
host: smtp.gmail.com
port: 587
username: your-gmail-username@gmail.com
password: your-gmail-app-password
auth: true
starttls: true
ssl: false
from: your-gmail-username@gmail.com
# QQMail配置
qqmail:
host: smtp.qq.com
port: 587
username: your-qq-email@qq.com
password: your-qq-authorization-code
auth: true
starttls: true
ssl: false
from: your-qq-email@qq.com
# 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