兼容redis

This commit is contained in:
2025-07-29 22:13:47 +08:00
parent fd7834821e
commit c02e3421ad
3 changed files with 250 additions and 38 deletions

View File

@@ -30,11 +30,22 @@ spring:
dialect: org.hibernate.dialect.MySQL8Dialect
format_sql: true
# Redis集群配置
# Redis配置(支持单节点和集群模式)
redis:
cluster:
nodes: 42.192.62.91:7000,42.192.62.91:7001,42.192.62.91:7002,42.192.62.91:7003,42.192.62.91:7004,42.192.62.91:7005
password: 6HU3cw1drNjfQ0zo1Uyx
# 模式选择single单节点cluster(集群)
# 注释掉cluster配置即自动使用单节点模式
# === 单节点配置(默认) ===
host: localhost
port: 6379
database: 0
# === 集群配置(使用时取消注释) ===
# cluster:
# nodes: 42.192.62.91:7000,42.192.62.91:7001,42.192.62.91:7002,42.192.62.91:7003,42.192.62.91:7004,42.192.62.91:7005
# 通用配置
password:
timeout: 5000
jedis:
pool: