From d8d00f117eb341479d7294c26d2a3dd1434745a4 Mon Sep 17 00:00:00 2001 From: Cavero Barca Date: Thu, 23 Jul 2020 17:03:16 +0200 Subject: [PATCH] Include the following changes: - Upgrade Spring Cloud Consul to latest version - Deploy the Spring Boot version as web as described in the article - Add leadership-consul dependendencies --- spring-cloud/spring-cloud-consul/pom.xml | 29 ++++++++++++++++--- .../discovery/DiscoveryClientApplication.java | 2 +- 2 files changed, 26 insertions(+), 5 deletions(-) diff --git a/spring-cloud/spring-cloud-consul/pom.xml b/spring-cloud/spring-cloud-consul/pom.xml index f7f5f84c56..4d4ac0aa01 100644 --- a/spring-cloud/spring-cloud-consul/pom.xml +++ b/spring-cloud/spring-cloud-consul/pom.xml @@ -12,6 +12,13 @@ spring-cloud 1.0.0-SNAPSHOT + + + + jitpack.io + https://jitpack.io + + @@ -25,18 +32,32 @@ spring-cloud-starter-consul-config ${spring-cloud-starter-consul.version} - + + org.springframework.boot + spring-boot-starter-web + org.springframework.boot spring-boot-starter-test - ${spring-boot-starter-test.version} test + + com.github.kinguinltdhk + leadership-consul + ${kinguinltdhk.version} + + + com.ecwid.consul + consul-api + + + - 1.3.0.RELEASE - 1.5.10.RELEASE + 2.2.3.RELEASE + 0.3.1 + com.baeldung.spring.cloud.consul.discovery.DiscoveryClientApplication diff --git a/spring-cloud/spring-cloud-consul/src/main/java/com/baeldung/spring/cloud/consul/discovery/DiscoveryClientApplication.java b/spring-cloud/spring-cloud-consul/src/main/java/com/baeldung/spring/cloud/consul/discovery/DiscoveryClientApplication.java index e01799b8d9..e27aaf09ae 100644 --- a/spring-cloud/spring-cloud-consul/src/main/java/com/baeldung/spring/cloud/consul/discovery/DiscoveryClientApplication.java +++ b/spring-cloud/spring-cloud-consul/src/main/java/com/baeldung/spring/cloud/consul/discovery/DiscoveryClientApplication.java @@ -11,7 +11,7 @@ import static org.springframework.boot.WebApplicationType.NONE; public class DiscoveryClientApplication { public static void main(String[] args) { - new SpringApplicationBuilder(DiscoveryClientApplication.class).web(NONE) + new SpringApplicationBuilder(DiscoveryClientApplication.class) .run(args); }