From 7da6df80613a29d6d7cd7e2ebef145ccea606682 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A8=8B=E5=BA=8F=E7=8C=BFDD?= Date: Tue, 31 May 2016 21:56:19 +0800 Subject: [PATCH] =?UTF-8?q?Spring=20Cloud=E6=9E=84=E5=BB=BA=E5=BE=AE?= =?UTF-8?q?=E6=9C=8D=E5=8A=A1=E6=9E=B6=E6=9E=84=EF=BC=88=E4=B8=80=EF=BC=89?= =?UTF-8?q?=E2=80=94=E2=80=94=E6=9C=8D=E5=8A=A1=E6=B3=A8=E5=86=8C=E4=B8=8E?= =?UTF-8?q?=E5=8F=91=E7=8E=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Chapter9-1-1/compute-service/pom.xml | 40 +++++++++---------- .../didispace/ComputeServiceApplication.java | 2 +- .../src/main/resources/application.properties | 6 +++ .../src/main/resources/application.yml | 15 ------- 4 files changed, 26 insertions(+), 37 deletions(-) create mode 100644 Chapter9-1-1/compute-service/src/main/resources/application.properties delete mode 100755 Chapter9-1-1/compute-service/src/main/resources/application.yml diff --git a/Chapter9-1-1/compute-service/pom.xml b/Chapter9-1-1/compute-service/pom.xml index d9b03af..04ef83d 100644 --- a/Chapter9-1-1/compute-service/pom.xml +++ b/Chapter9-1-1/compute-service/pom.xml @@ -12,9 +12,10 @@ Spring Cloud project - org.springframework.cloud - spring-cloud-starter-parent - 1.0.0.RELEASE + org.springframework.boot + spring-boot-starter-parent + 1.3.5.RELEASE + @@ -24,8 +25,8 @@ - org.springframework.boot - spring-boot-starter + org.springframework.cloud + spring-cloud-starter-eureka @@ -34,23 +35,20 @@ test - - org.springframework.boot - spring-boot-starter-web - - - - org.springframework.cloud - spring-cloud-starter - - - - org.springframework.cloud - spring-cloud-starter-eureka - - - + + + + + org.springframework.cloud + spring-cloud-dependencies + Brixton.RELEASE + pom + import + + + + diff --git a/Chapter9-1-1/compute-service/src/main/java/com/didispace/ComputeServiceApplication.java b/Chapter9-1-1/compute-service/src/main/java/com/didispace/ComputeServiceApplication.java index 52aeb49..b0a0058 100755 --- a/Chapter9-1-1/compute-service/src/main/java/com/didispace/ComputeServiceApplication.java +++ b/Chapter9-1-1/compute-service/src/main/java/com/didispace/ComputeServiceApplication.java @@ -4,8 +4,8 @@ import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.cloud.client.discovery.EnableDiscoveryClient; -@SpringBootApplication @EnableDiscoveryClient +@SpringBootApplication public class ComputeServiceApplication { public static void main(String[] args) { diff --git a/Chapter9-1-1/compute-service/src/main/resources/application.properties b/Chapter9-1-1/compute-service/src/main/resources/application.properties new file mode 100644 index 0000000..c14fe52 --- /dev/null +++ b/Chapter9-1-1/compute-service/src/main/resources/application.properties @@ -0,0 +1,6 @@ +spring.application.name=compute-service + +server.port=2222 + +eureka.client.serviceUrl.defaultZone=http://localhost:1111/eureka/ + diff --git a/Chapter9-1-1/compute-service/src/main/resources/application.yml b/Chapter9-1-1/compute-service/src/main/resources/application.yml deleted file mode 100755 index 5abaf2a..0000000 --- a/Chapter9-1-1/compute-service/src/main/resources/application.yml +++ /dev/null @@ -1,15 +0,0 @@ -# Spring properties -spring: - application: - name: compute-service - -# HTTP Server -server: - port: 2222 # HTTP (Tomcat) port - -# Discovery Server Access -eureka: - client: - serviceUrl: - defaultZone: http://localhost:1111/eureka/ -