From 8fbb9bc9d653c11be5cd3f6c8e9681d782214593 Mon Sep 17 00:00:00 2001 From: lishouyu <18332763730@163.com> Date: Mon, 31 Jul 2017 17:01:20 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../server/ConfigServerApplication.java | 29 +++++---- .../src/main/resources/application.yml | 52 ++++++++-------- .../src/main/resources/bootstrap.yml | 2 +- .../src/main/resources/application.yml | 52 ++++++++-------- .../src/main/resources/bootstrap.yml | 14 ++--- upms/src/main/resources/application.yml | 60 +++++++++---------- upms/src/main/resources/bootstrap.yml | 2 +- 7 files changed, 105 insertions(+), 106 deletions(-) diff --git a/config-server/src/main/java/com/micro/fast/config/server/ConfigServerApplication.java b/config-server/src/main/java/com/micro/fast/config/server/ConfigServerApplication.java index 16c1b7f..fd43955 100644 --- a/config-server/src/main/java/com/micro/fast/config/server/ConfigServerApplication.java +++ b/config-server/src/main/java/com/micro/fast/config/server/ConfigServerApplication.java @@ -1,15 +1,14 @@ -package com.micro.fast.config.server; - -import org.springframework.boot.SpringApplication; -import org.springframework.boot.autoconfigure.SpringBootApplication; -import org.springframework.cloud.client.discovery.EnableDiscoveryClient; -import org.springframework.cloud.config.server.EnableConfigServer; - -@SpringBootApplication -@EnableConfigServer //开启配置中心相关服务 -public class ConfigServerApplication { - - public static void main(String[] args) { - SpringApplication.run(ConfigServerApplication.class, args); - } -} +package com.micro.fast.config.server; + +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.cloud.config.server.EnableConfigServer; + +@SpringBootApplication +@EnableConfigServer //开启配置中心相关服务 +public class ConfigServerApplication { + + public static void main(String[] args) { + SpringApplication.run(ConfigServerApplication.class, args); + } +} diff --git a/eureka-server/src/main/resources/application.yml b/eureka-server/src/main/resources/application.yml index 7580259..c54c25d 100644 --- a/eureka-server/src/main/resources/application.yml +++ b/eureka-server/src/main/resources/application.yml @@ -1,27 +1,27 @@ -# 只是用来在本地编写文件用,无任何使用 -info: - app: - profiles: dev - name: eureka-server #从pom.xml中获取 - description: eureka-server -spring: - application: - name: eureka-server # 实例的名称 -server: - port: 10002 -eureka: - client: - service-url: - defaultZone: http://192.168.0.103:10003/eureka #和其他注册中心连接 - instance: - hostname: www.eureka.server.com # 实例的主机名 -# 健康检查的配置 -management: - health: - mail: - enabled: false - redis: - enabled: false - security: - enabled: false #springbooot1.5.*以后如果要使用refresh功能的要设置false +# 只是用来在本地编写文件用,无任何使用 +info: + app: + profiles: dev + name: eureka-server #从pom.xml中获取 + description: eureka-server +spring: + application: + name: eureka-server # 实例的名称 +server: + port: 10002 +eureka: + client: + service-url: + defaultZone: http://127.0.0.1:10003/eureka #和其他注册中心连接 + instance: + hostname: www.eureka.server.com # 实例的主机名 +# 健康检查的配置 +management: + health: + mail: + enabled: false + redis: + enabled: false + security: + enabled: false #springbooot1.5.*以后如果要使用refresh功能的要设置false port: 20002 \ No newline at end of file diff --git a/eureka-server/src/main/resources/bootstrap.yml b/eureka-server/src/main/resources/bootstrap.yml index 602eb80..2befaa2 100644 --- a/eureka-server/src/main/resources/bootstrap.yml +++ b/eureka-server/src/main/resources/bootstrap.yml @@ -2,7 +2,7 @@ spring: cloud: config: - uri: http://192.168.0.103:10001/ + uri: http://127.0.0.1:10001/ profile: dev label: master name: eureka-server diff --git a/eureka-server2/src/main/resources/application.yml b/eureka-server2/src/main/resources/application.yml index 7cadfae..30c3ad6 100644 --- a/eureka-server2/src/main/resources/application.yml +++ b/eureka-server2/src/main/resources/application.yml @@ -1,27 +1,27 @@ -# 只是用来在本地编写文件用,无任何使用 -info: - app: - profiles: dev - name: eureka-server2 #从pom.xml中获取 - description: eureka-server2 -spring: - application: - name: eureka-server2 # 实例的名称 -server: - port: 10003 -eureka: - client: - service-url: - defaultZone: http://192.168.0.103:10002/eureka #和其他注册中心连接 - instance: - hostname: www.eureka.server2.com # 实例的主机名 -# 健康检查的配置 -management: - health: - mail: - enabled: false - redis: - enabled: false - security: - enabled: false #springbooot1.5.*以后如果要使用refresh功能的要设置false +# 只是用来在本地编写文件用,无任何使用 +info: + app: + profiles: dev + name: eureka-server2 #从pom.xml中获取 + description: eureka-server2 +spring: + application: + name: eureka-server2 # 实例的名称 +server: + port: 10003 +eureka: + client: + service-url: + defaultZone: http://127.0.0.1:10002/eureka #和其他注册中心连接 + instance: + hostname: www.eureka.server2.com # 实例的主机名 +# 健康检查的配置 +management: + health: + mail: + enabled: false + redis: + enabled: false + security: + enabled: false #springbooot1.5.*以后如果要使用refresh功能的要设置false port: 20003 \ No newline at end of file diff --git a/eureka-server2/src/main/resources/bootstrap.yml b/eureka-server2/src/main/resources/bootstrap.yml index eb6dbb0..fc5cea5 100644 --- a/eureka-server2/src/main/resources/bootstrap.yml +++ b/eureka-server2/src/main/resources/bootstrap.yml @@ -1,7 +1,7 @@ -spring: - cloud: - config: - name: eureka-server2 - profile: dev - label: master - uri: http://192.168.0.103:10001/ +spring: + cloud: + config: + name: eureka-server2 + profile: dev + label: master + uri: http://127.0.0.1:10001/ diff --git a/upms/src/main/resources/application.yml b/upms/src/main/resources/application.yml index 9e5c639..39869a1 100644 --- a/upms/src/main/resources/application.yml +++ b/upms/src/main/resources/application.yml @@ -1,30 +1,30 @@ -# 只是用来在本地编写文件用,无任何使用 -info: - app: - profiles: dev - name: upms - description: upms -spring: - application: - name: upms -server: - port: 10004 -eureka: - client: - serviceUrl: - defaultZone: http://192.168.0.103:10002/eureka/,http://192.168.0.103:10003/eureka/ #配置所有的注册中心 - instance: - hostname: www.upms.com -feign: - hystrix: - enabled: true #开启监控熔断 -# 健康检查的相关配置 -management: - health: - mail: - enabled: false - redis: - enabled: false - security: - enabled: false #springbooot1.5.*以后如果要使用refresh功能的要设置false - port: 20004 +# 只是用来在本地编写文件用,无任何使用 +info: + app: + profiles: dev + name: upms + description: upms +spring: + application: + name: upms +server: + port: 10004 +eureka: + client: + serviceUrl: + defaultZone: http://127.0.0.1:10002/eureka/,http://127.0.0.1:10003/eureka/ #配置所有的注册中心 + instance: + hostname: www.upms.com +feign: + hystrix: + enabled: true #开启监控熔断 +# 健康检查的相关配置 +management: + health: + mail: + enabled: false + redis: + enabled: false + security: + enabled: false #springbooot1.5.*以后如果要使用refresh功能的要设置false + port: 20004 diff --git a/upms/src/main/resources/bootstrap.yml b/upms/src/main/resources/bootstrap.yml index 75d9930..edc5b86 100644 --- a/upms/src/main/resources/bootstrap.yml +++ b/upms/src/main/resources/bootstrap.yml @@ -2,7 +2,7 @@ spring: cloud: config: - uri: http://192.168.0.103:10001/ + uri: http://127.0.0.1:10001/ profile: dev label: master name: upms \ No newline at end of file