From 6c62a6489db400757f5d7f07d13724a1edf9d491 Mon Sep 17 00:00:00 2001 From: zlt Date: Sat, 23 Mar 2019 11:22:43 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96redis=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=EF=BC=8C=E5=9B=A0=E4=B8=BAredis=E4=B8=8D=E5=90=8C=E7=9A=84?= =?UTF-8?q?=E9=9B=86=E7=BE=A4=E9=85=8D=E7=BD=AE=E5=AE=8C=E5=85=A8=E4=B8=8D?= =?UTF-8?q?=E4=B8=80=E6=A0=B7=EF=BC=8C=E6=89=80=E4=BB=A5=E7=BB=9F=E4=B8=80?= =?UTF-8?q?=E6=94=BE=E5=88=B0zlt-config=E4=B8=AD=E7=BB=9F=E4=B8=80?= =?UTF-8?q?=E7=AE=A1=E7=90=86=E5=90=84=E7=8E=AF=E5=A2=83=E7=9A=84redis?= =?UTF-8?q?=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/application.yml | 5 ----- .../src/main/resources/application.yml | 5 ----- .../main/resources/application-dev.properties | 6 +++--- .../main/resources/application-prod.properties | 17 +++++++++++++++++ .../main/resources/application-test.properties | 6 +++--- .../src/main/resources/application.yml | 7 +------ .../src/main/resources/application.yml | 5 ----- zlt-uaa/src/main/resources/application.yml | 5 ----- 8 files changed, 24 insertions(+), 32 deletions(-) create mode 100644 zlt-config/src/main/resources/application-prod.properties diff --git a/zlt-business/file-center/src/main/resources/application.yml b/zlt-business/file-center/src/main/resources/application.yml index bbdb9577..47637e35 100644 --- a/zlt-business/file-center/src/main/resources/application.yml +++ b/zlt-business/file-center/src/main/resources/application.yml @@ -20,11 +20,6 @@ spring: password: ${zlt.datasource.password} driver-class-name: com.mysql.jdbc.Driver - redis: - host: ${zlt.redis.host} - port: ${zlt.redis.port} - timeout: ${zlt.redis.timeout} - mybatis-plus: mapper-locations: classpath:/mapper/*Mapper.xml #实体扫描,多个package用逗号或者分号分隔 diff --git a/zlt-business/user-center/src/main/resources/application.yml b/zlt-business/user-center/src/main/resources/application.yml index 0e6a2767..6ee1084d 100644 --- a/zlt-business/user-center/src/main/resources/application.yml +++ b/zlt-business/user-center/src/main/resources/application.yml @@ -5,11 +5,6 @@ spring: password: ${zlt.datasource.password} driver-class-name: com.mysql.jdbc.Driver - redis: - host: ${zlt.redis.host} - port: ${zlt.redis.port} - timeout: ${zlt.redis.timeout} - mybatis-plus: mapper-locations: classpath:/mapper/*Mapper.xml #实体扫描,多个package用逗号或者分号分隔 diff --git a/zlt-config/src/main/resources/application-dev.properties b/zlt-config/src/main/resources/application-dev.properties index 0b123765..cbdd2f46 100644 --- a/zlt-config/src/main/resources/application-dev.properties +++ b/zlt-config/src/main/resources/application-dev.properties @@ -5,9 +5,9 @@ zlt.datasource.username=root zlt.datasource.password=1q2w3e4r ##### redis配置 -zlt.redis.host=192.168.28.130 -zlt.redis.port=6379 -zlt.redis.timeout=5000 +spring.redis.host=192.168.28.130 +spring.redis.port=6379 +spring.redis.timeout=5000 ##### elasticsearch配置 zlt.elasticsearch.cluster-name=my-es diff --git a/zlt-config/src/main/resources/application-prod.properties b/zlt-config/src/main/resources/application-prod.properties new file mode 100644 index 00000000..b1800879 --- /dev/null +++ b/zlt-config/src/main/resources/application-prod.properties @@ -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 \ No newline at end of file diff --git a/zlt-config/src/main/resources/application-test.properties b/zlt-config/src/main/resources/application-test.properties index 4a1a7c57..e6da1900 100644 --- a/zlt-config/src/main/resources/application-test.properties +++ b/zlt-config/src/main/resources/application-test.properties @@ -5,9 +5,9 @@ zlt.datasource.username=root zlt.datasource.password=1q2w3e4r ##### redis配置 -zlt.redis.host=120.78.94.191 -zlt.redis.port=6379 -zlt.redis.timeout=5000 +spring.redis.host=120.78.94.191 +spring.redis.port=6379 +spring.redis.timeout=5000 ##### elasticsearch配置 zlt.elasticsearch.cluster-name=my-es diff --git a/zlt-gateway/spring-cloud-gateway/src/main/resources/application.yml b/zlt-gateway/spring-cloud-gateway/src/main/resources/application.yml index 89b1bdb0..b4c6eca6 100644 --- a/zlt-gateway/spring-cloud-gateway/src/main/resources/application.yml +++ b/zlt-gateway/spring-cloud-gateway/src/main/resources/application.yml @@ -29,9 +29,4 @@ spring: predicates: - Path=/api-file/** filters: - - StripPrefix=1 - - redis: - host: ${zlt.redis.host} - port: ${zlt.redis.port} - timeout: ${zlt.redis.timeout} \ No newline at end of file + - StripPrefix=1 \ No newline at end of file diff --git a/zlt-gateway/zuul-gateway/src/main/resources/application.yml b/zlt-gateway/zuul-gateway/src/main/resources/application.yml index 66f8eb24..03940919 100644 --- a/zlt-gateway/zuul-gateway/src/main/resources/application.yml +++ b/zlt-gateway/zuul-gateway/src/main/resources/application.yml @@ -1,9 +1,4 @@ spring: - redis: - host: ${zlt.redis.host} - port: ${zlt.redis.port} - timeout: ${zlt.redis.timeout} - # sentinel动态配置规则 cloud: sentinel: diff --git a/zlt-uaa/src/main/resources/application.yml b/zlt-uaa/src/main/resources/application.yml index 39d69454..a7c52762 100644 --- a/zlt-uaa/src/main/resources/application.yml +++ b/zlt-uaa/src/main/resources/application.yml @@ -5,11 +5,6 @@ spring: password: ${zlt.datasource.password} driver-class-name: com.mysql.jdbc.Driver - redis: - host: ${zlt.redis.host} - port: ${zlt.redis.port} - timeout: ${zlt.redis.timeout} - mybatis-plus: mapper-locations: classpath:/mapper/*Mapper.xml #实体扫描,多个package用逗号或者分号分隔