Skip to content

Commit

Permalink
discovery client
Browse files Browse the repository at this point in the history
  • Loading branch information
benwang6 committed Dec 4, 2019
1 parent 08812c5 commit 7db3e60
Show file tree
Hide file tree
Showing 10 changed files with 77 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#Generated by Maven Integration for Eclipse
#Wed Dec 04 21:56:56 CST 2019
#Wed Dec 04 22:37:49 CST 2019
version=0.0.1-SNAPSHOT
groupId=cn.tedu
m2e.projectName=sp01-commons
Expand Down
17 changes: 17 additions & 0 deletions sp02-itemservice/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,12 @@
<artifactId>sp01-commons</artifactId>
<version>0.0.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>
spring-cloud-starter-netflix-eureka-client
</artifactId>
</dependency>
</dependencies>

<build>
Expand All @@ -51,4 +57,15 @@
</plugins>
</build>

<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-dependencies</artifactId>
<version>Hoxton.RELEASE</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;

@EnableDiscoveryClient
@SpringBootApplication
public class Sp02ItemserviceApplication {

Expand Down
7 changes: 6 additions & 1 deletion sp02-itemservice/src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,9 @@ spring:
name: item-service

server:
port: 8001
port: 8001

eureka:
client:
service-url:
defaultZone: http://eureka1:2001/eureka
17 changes: 17 additions & 0 deletions sp03-userservice/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,12 @@
<artifactId>sp01-commons</artifactId>
<version>0.0.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>
spring-cloud-starter-netflix-eureka-client
</artifactId>
</dependency>
</dependencies>

<build>
Expand All @@ -51,4 +57,15 @@
</plugins>
</build>

<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-dependencies</artifactId>
<version>Hoxton.RELEASE</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;

@EnableDiscoveryClient
@SpringBootApplication
public class Sp03UserserviceApplication {

Expand Down
7 changes: 6 additions & 1 deletion sp03-userservice/src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,9 @@ spring:
name: user-service

server:
port: 8101
port: 8101

eureka:
client:
service-url:
defaultZone: http://eureka1:2001/eureka
17 changes: 17 additions & 0 deletions sp04-orderservice/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,12 @@
<artifactId>sp01-commons</artifactId>
<version>0.0.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>
spring-cloud-starter-netflix-eureka-client
</artifactId>
</dependency>
</dependencies>

<build>
Expand All @@ -51,4 +57,15 @@
</plugins>
</build>

<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-dependencies</artifactId>
<version>Hoxton.RELEASE</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;

@EnableDiscoveryClient
@SpringBootApplication
public class Sp04OrderserviceApplication {

Expand Down
8 changes: 7 additions & 1 deletion sp04-orderservice/src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,10 @@ spring:
name: order-service

server:
port: 8201
port: 8201


eureka:
client:
service-url:
defaultZone: http://eureka1:2001/eureka

0 comments on commit 7db3e60

Please sign in to comment.