From a822f2ed0c84066042a8efbe43869791a2d27c23 Mon Sep 17 00:00:00 2001 From: anuragkumawat Date: Fri, 29 Mar 2024 16:11:09 +0530 Subject: [PATCH] JAVA-30993 Upgrade spring-boot-di, spring-boot-aws to spring-boot-3 (#16221) * JAVA-30993 Upgrade spring-boot-di, spring-boot-aws to spring-boot-3 * JAVA-30993 Revert maven shade plugin version upgrade --- spring-boot-modules/pom.xml | 4 ++-- spring-boot-modules/spring-boot-aws/pom.xml | 24 +++++++++++++++---- .../DisplayBeanIntegrationTest.java | 8 +++---- 3 files changed, 25 insertions(+), 11 deletions(-) diff --git a/spring-boot-modules/pom.xml b/spring-boot-modules/pom.xml index 2b62b3d1bc..69b5e2b598 100644 --- a/spring-boot-modules/pom.xml +++ b/spring-boot-modules/pom.xml @@ -33,7 +33,7 @@ spring-boot-config-jpa-error spring-boot-ctx-fluent spring-boot-deployment - + spring-boot-di spring-boot-disable-logging spring-boot-ci-cd @@ -104,7 +104,7 @@ spring-boot-properties-3 spring-boot-properties-4 spring-boot-properties-migrator-demo - spring-boot-aws + spring-boot-aws spring-boot-keycloak-adapters spring-boot-mvc-legacy spring-boot-springdoc-2 diff --git a/spring-boot-modules/spring-boot-aws/pom.xml b/spring-boot-modules/spring-boot-aws/pom.xml index 44cd38be3f..8be0b230cd 100644 --- a/spring-boot-modules/spring-boot-aws/pom.xml +++ b/spring-boot-modules/spring-boot-aws/pom.xml @@ -13,7 +13,7 @@ org.springframework.boot spring-boot-starter-parent - 2.7.11 + 3.1.5 @@ -24,8 +24,21 @@ com.amazonaws.serverless - aws-serverless-java-container-springboot2 - ${aws-serverless-java-container-springboot2.version} + aws-serverless-java-container-springboot3 + ${aws-serverless-java-container.version} + + + com.amazonaws.serverless + aws-serverless-java-container-core + ${aws-serverless-java-container.version} + tests + test-jar + test + + + org.apache.httpcomponents.client5 + httpclient5 + ${httpclient5.version} org.springframework.boot @@ -74,10 +87,11 @@ - 1.9.1 - 3.2.4 + 2.0.0 + 3.3.0 11 11 + 5.3.1 \ No newline at end of file diff --git a/spring-boot-modules/spring-boot-di/src/test/java/com/baeldung/displayallbeans/DisplayBeanIntegrationTest.java b/spring-boot-modules/spring-boot-di/src/test/java/com/baeldung/displayallbeans/DisplayBeanIntegrationTest.java index f08a755fc7..4e157e4e13 100644 --- a/spring-boot-modules/spring-boot-di/src/test/java/com/baeldung/displayallbeans/DisplayBeanIntegrationTest.java +++ b/spring-boot-modules/spring-boot-di/src/test/java/com/baeldung/displayallbeans/DisplayBeanIntegrationTest.java @@ -13,10 +13,10 @@ import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; -import org.springframework.boot.actuate.beans.BeansEndpoint.ContextBeans; +import org.springframework.boot.actuate.beans.BeansEndpoint.ContextBeansDescriptor; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.boot.test.web.client.TestRestTemplate; -import org.springframework.boot.web.server.LocalServerPort; +import org.springframework.boot.test.web.server.LocalServerPort; import org.springframework.core.ParameterizedTypeReference; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; @@ -54,12 +54,12 @@ public class DisplayBeanIntegrationTest { @Test public void givenRestTemplate_whenAccessEndpointUrl_thenHttpStatusOK() throws Exception { - ParameterizedTypeReference> responseType = new ParameterizedTypeReference>() { + ParameterizedTypeReference> responseType = new ParameterizedTypeReference>() { }; RequestEntity requestEntity = RequestEntity.get(new URI("http://localhost:" + this.mgt + ACTUATOR_PATH + "/beans")) .accept(MediaType.APPLICATION_JSON) .build(); - ResponseEntity> entity = this.testRestTemplate.exchange(requestEntity, responseType); + ResponseEntity> entity = this.testRestTemplate.exchange(requestEntity, responseType); then(entity.getStatusCode()).isEqualTo(HttpStatus.OK); }