优化redis配置,因为redis不同的集群配置完全不一样,所以统一放到zlt-config中统一管理各环境的redis配置
This commit is contained in:
@@ -20,11 +20,6 @@ spring:
|
|||||||
password: ${zlt.datasource.password}
|
password: ${zlt.datasource.password}
|
||||||
driver-class-name: com.mysql.jdbc.Driver
|
driver-class-name: com.mysql.jdbc.Driver
|
||||||
|
|
||||||
redis:
|
|
||||||
host: ${zlt.redis.host}
|
|
||||||
port: ${zlt.redis.port}
|
|
||||||
timeout: ${zlt.redis.timeout}
|
|
||||||
|
|
||||||
mybatis-plus:
|
mybatis-plus:
|
||||||
mapper-locations: classpath:/mapper/*Mapper.xml
|
mapper-locations: classpath:/mapper/*Mapper.xml
|
||||||
#实体扫描,多个package用逗号或者分号分隔
|
#实体扫描,多个package用逗号或者分号分隔
|
||||||
|
|||||||
@@ -5,11 +5,6 @@ spring:
|
|||||||
password: ${zlt.datasource.password}
|
password: ${zlt.datasource.password}
|
||||||
driver-class-name: com.mysql.jdbc.Driver
|
driver-class-name: com.mysql.jdbc.Driver
|
||||||
|
|
||||||
redis:
|
|
||||||
host: ${zlt.redis.host}
|
|
||||||
port: ${zlt.redis.port}
|
|
||||||
timeout: ${zlt.redis.timeout}
|
|
||||||
|
|
||||||
mybatis-plus:
|
mybatis-plus:
|
||||||
mapper-locations: classpath:/mapper/*Mapper.xml
|
mapper-locations: classpath:/mapper/*Mapper.xml
|
||||||
#实体扫描,多个package用逗号或者分号分隔
|
#实体扫描,多个package用逗号或者分号分隔
|
||||||
|
|||||||
@@ -5,9 +5,9 @@ zlt.datasource.username=root
|
|||||||
zlt.datasource.password=1q2w3e4r
|
zlt.datasource.password=1q2w3e4r
|
||||||
|
|
||||||
##### redis配置
|
##### redis配置
|
||||||
zlt.redis.host=192.168.28.130
|
spring.redis.host=192.168.28.130
|
||||||
zlt.redis.port=6379
|
spring.redis.port=6379
|
||||||
zlt.redis.timeout=5000
|
spring.redis.timeout=5000
|
||||||
|
|
||||||
##### elasticsearch配置
|
##### elasticsearch配置
|
||||||
zlt.elasticsearch.cluster-name=my-es
|
zlt.elasticsearch.cluster-name=my-es
|
||||||
|
|||||||
@@ -0,0 +1,17 @@
|
|||||||
|
########################## 统一变量配置 ##########################
|
||||||
|
##### 数据库配置
|
||||||
|
zlt.datasource.ip=120.78.94.191
|
||||||
|
zlt.datasource.username=root
|
||||||
|
zlt.datasource.password=1q2w3e4r
|
||||||
|
|
||||||
|
##### redis配置
|
||||||
|
spring.redis.sentinel.master=mymaster
|
||||||
|
spring.redis.sentinel.nodes=120.78.94.191:26380,120.78.94.191:26381
|
||||||
|
spring.redis.password=1q2w3e4r
|
||||||
|
|
||||||
|
##### elasticsearch配置
|
||||||
|
zlt.elasticsearch.cluster-name=my-es
|
||||||
|
zlt.elasticsearch.cluster-nodes=47.107.114.25:9300
|
||||||
|
|
||||||
|
##### sentinel配置
|
||||||
|
zlt.sentinel.dashboard=120.78.94.191:6999
|
||||||
@@ -5,9 +5,9 @@ zlt.datasource.username=root
|
|||||||
zlt.datasource.password=1q2w3e4r
|
zlt.datasource.password=1q2w3e4r
|
||||||
|
|
||||||
##### redis配置
|
##### redis配置
|
||||||
zlt.redis.host=120.78.94.191
|
spring.redis.host=120.78.94.191
|
||||||
zlt.redis.port=6379
|
spring.redis.port=6379
|
||||||
zlt.redis.timeout=5000
|
spring.redis.timeout=5000
|
||||||
|
|
||||||
##### elasticsearch配置
|
##### elasticsearch配置
|
||||||
zlt.elasticsearch.cluster-name=my-es
|
zlt.elasticsearch.cluster-name=my-es
|
||||||
|
|||||||
@@ -29,9 +29,4 @@ spring:
|
|||||||
predicates:
|
predicates:
|
||||||
- Path=/api-file/**
|
- Path=/api-file/**
|
||||||
filters:
|
filters:
|
||||||
- StripPrefix=1
|
- StripPrefix=1
|
||||||
|
|
||||||
redis:
|
|
||||||
host: ${zlt.redis.host}
|
|
||||||
port: ${zlt.redis.port}
|
|
||||||
timeout: ${zlt.redis.timeout}
|
|
||||||
@@ -1,9 +1,4 @@
|
|||||||
spring:
|
spring:
|
||||||
redis:
|
|
||||||
host: ${zlt.redis.host}
|
|
||||||
port: ${zlt.redis.port}
|
|
||||||
timeout: ${zlt.redis.timeout}
|
|
||||||
|
|
||||||
# sentinel动态配置规则
|
# sentinel动态配置规则
|
||||||
cloud:
|
cloud:
|
||||||
sentinel:
|
sentinel:
|
||||||
|
|||||||
@@ -5,11 +5,6 @@ spring:
|
|||||||
password: ${zlt.datasource.password}
|
password: ${zlt.datasource.password}
|
||||||
driver-class-name: com.mysql.jdbc.Driver
|
driver-class-name: com.mysql.jdbc.Driver
|
||||||
|
|
||||||
redis:
|
|
||||||
host: ${zlt.redis.host}
|
|
||||||
port: ${zlt.redis.port}
|
|
||||||
timeout: ${zlt.redis.timeout}
|
|
||||||
|
|
||||||
mybatis-plus:
|
mybatis-plus:
|
||||||
mapper-locations: classpath:/mapper/*Mapper.xml
|
mapper-locations: classpath:/mapper/*Mapper.xml
|
||||||
#实体扫描,多个package用逗号或者分号分隔
|
#实体扫描,多个package用逗号或者分号分隔
|
||||||
|
|||||||
Reference in New Issue
Block a user