From a538be29295061f1aca3c3d29febeaef38eae7fd Mon Sep 17 00:00:00 2001 From: Shobha Kamath Date: Thu, 28 Dec 2023 15:06:36 +0400 Subject: [PATCH] Upgrade to Spring Cloud 2023.0.0 (#249) * lombok issue fix * Added comment - lombok issue fix * Upgrade to Spring Cloud 2023.0.0 * Versioning the petclinic microservice * Versioning the petclinic microservice * Fix the docker image entrypoint * reverting * Fixing the entrypoint class --- docker/Dockerfile | 2 +- pom.xml | 6 +++--- spring-petclinic-admin-server/pom.xml | 4 ++-- spring-petclinic-api-gateway/pom.xml | 2 +- .../api/boundary/web/CircuitBreakerConfiguration.java | 9 +++++++++ spring-petclinic-config-server/pom.xml | 2 +- spring-petclinic-customers-service/pom.xml | 2 +- spring-petclinic-discovery-server/pom.xml | 2 +- spring-petclinic-vets-service/pom.xml | 2 +- spring-petclinic-visits-service/pom.xml | 2 +- 10 files changed, 21 insertions(+), 12 deletions(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index b9f789b63..80bd0aa69 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -17,4 +17,4 @@ COPY --from=builder application/dependencies/ ./ COPY --from=builder application/spring-boot-loader/ ./ COPY --from=builder application/snapshot-dependencies/ ./ COPY --from=builder application/application/ ./ -ENTRYPOINT ["java", "org.springframework.boot.loader.JarLauncher"] +ENTRYPOINT ["java", "org.springframework.boot.loader.launch.JarLauncher"] diff --git a/pom.xml b/pom.xml index 2481f4849..af085bafc 100644 --- a/pom.xml +++ b/pom.xml @@ -6,12 +6,12 @@ org.springframework.boot spring-boot-starter-parent - 3.0.9 + 3.2.0 org.springframework.samples spring-petclinic-microservices - 3.0.9 + 3.2.0 ${project.artifactId} pom @@ -28,7 +28,7 @@ 17 - 2022.0.4 + 2023.0.0 2.3.10 1.7.1 diff --git a/spring-petclinic-admin-server/pom.xml b/spring-petclinic-admin-server/pom.xml index 72075152c..ff3d7f05a 100644 --- a/spring-petclinic-admin-server/pom.xml +++ b/spring-petclinic-admin-server/pom.xml @@ -12,11 +12,11 @@ org.springframework.samples spring-petclinic-microservices - 3.0.9 + 3.2.0 - 3.0.4 + 3.2.0 9090 ${basedir}/../docker diff --git a/spring-petclinic-api-gateway/pom.xml b/spring-petclinic-api-gateway/pom.xml index cc440f2dd..1c8df1151 100644 --- a/spring-petclinic-api-gateway/pom.xml +++ b/spring-petclinic-api-gateway/pom.xml @@ -11,7 +11,7 @@ org.springframework.samples spring-petclinic-microservices - 3.0.9 + 3.2.0 diff --git a/spring-petclinic-api-gateway/src/test/java/org/springframework/samples/petclinic/api/boundary/web/CircuitBreakerConfiguration.java b/spring-petclinic-api-gateway/src/test/java/org/springframework/samples/petclinic/api/boundary/web/CircuitBreakerConfiguration.java index 4fe17d0b8..0a240098b 100644 --- a/spring-petclinic-api-gateway/src/test/java/org/springframework/samples/petclinic/api/boundary/web/CircuitBreakerConfiguration.java +++ b/spring-petclinic-api-gateway/src/test/java/org/springframework/samples/petclinic/api/boundary/web/CircuitBreakerConfiguration.java @@ -2,8 +2,10 @@ import io.github.resilience4j.circuitbreaker.CircuitBreakerRegistry; import io.github.resilience4j.timelimiter.TimeLimiterRegistry; +import org.springframework.cloud.circuitbreaker.resilience4j.Resilience4JConfigurationProperties; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; +import org.springframework.context.annotation.Primary; @Configuration public class CircuitBreakerConfiguration { @@ -17,4 +19,11 @@ public CircuitBreakerRegistry circuitBreakerRegistry() { public TimeLimiterRegistry timeLimiterRegistry() { return TimeLimiterRegistry.ofDefaults(); } + + @Bean + @Primary + public Resilience4JConfigurationProperties resilience4JConfigurationProperties(){ + return new Resilience4JConfigurationProperties(); + } + } diff --git a/spring-petclinic-config-server/pom.xml b/spring-petclinic-config-server/pom.xml index a2a9534c5..1bda2a9d8 100644 --- a/spring-petclinic-config-server/pom.xml +++ b/spring-petclinic-config-server/pom.xml @@ -11,7 +11,7 @@ org.springframework.samples spring-petclinic-microservices - 3.0.9 + 3.2.0 diff --git a/spring-petclinic-customers-service/pom.xml b/spring-petclinic-customers-service/pom.xml index 8c2fa3b9b..a8de2453a 100644 --- a/spring-petclinic-customers-service/pom.xml +++ b/spring-petclinic-customers-service/pom.xml @@ -11,7 +11,7 @@ org.springframework.samples spring-petclinic-microservices - 3.0.9 + 3.2.0 diff --git a/spring-petclinic-discovery-server/pom.xml b/spring-petclinic-discovery-server/pom.xml index f90a49a55..4710136c6 100644 --- a/spring-petclinic-discovery-server/pom.xml +++ b/spring-petclinic-discovery-server/pom.xml @@ -11,7 +11,7 @@ org.springframework.samples spring-petclinic-microservices - 3.0.9 + 3.2.0 diff --git a/spring-petclinic-vets-service/pom.xml b/spring-petclinic-vets-service/pom.xml index 3a4141e4a..a3427f491 100644 --- a/spring-petclinic-vets-service/pom.xml +++ b/spring-petclinic-vets-service/pom.xml @@ -11,7 +11,7 @@ org.springframework.samples spring-petclinic-microservices - 3.0.9 + 3.2.0 diff --git a/spring-petclinic-visits-service/pom.xml b/spring-petclinic-visits-service/pom.xml index a8f7f248d..cc89d53f0 100644 --- a/spring-petclinic-visits-service/pom.xml +++ b/spring-petclinic-visits-service/pom.xml @@ -11,7 +11,7 @@ org.springframework.samples spring-petclinic-microservices - 3.0.9 + 3.2.0