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
This commit is contained in:
anuragkumawat 2024-03-29 16:11:09 +05:30 committed by GitHub
parent a6ea78aa47
commit a822f2ed0c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 25 additions and 11 deletions

View File

@ -33,7 +33,7 @@
<module>spring-boot-config-jpa-error</module> <module>spring-boot-config-jpa-error</module>
<module>spring-boot-ctx-fluent</module> <module>spring-boot-ctx-fluent</module>
<module>spring-boot-deployment</module> <module>spring-boot-deployment</module>
<!-- <module>spring-boot-di</module>--> <!-- failing after upgrading to spring boot 3.2.x --> <module>spring-boot-di</module>
<module>spring-boot-disable-logging</module> <module>spring-boot-disable-logging</module>
<module>spring-boot-ci-cd</module> <module>spring-boot-ci-cd</module>
<!-- <module>spring-boot-cli</module> --> <!-- Not a maven project --> <!-- <module>spring-boot-cli</module> --> <!-- Not a maven project -->
@ -104,7 +104,7 @@
<module>spring-boot-properties-3</module> <!-- failing after upgrading to spring boot 3.2.x --> <module>spring-boot-properties-3</module> <!-- failing after upgrading to spring boot 3.2.x -->
<module>spring-boot-properties-4</module> <module>spring-boot-properties-4</module>
<module>spring-boot-properties-migrator-demo</module> <module>spring-boot-properties-migrator-demo</module>
<module>spring-boot-aws</module> <!-- This project is Spring Boot 2 and cannot be updated --> <module>spring-boot-aws</module>
<module>spring-boot-keycloak-adapters</module> <module>spring-boot-keycloak-adapters</module>
<module>spring-boot-mvc-legacy</module> <module>spring-boot-mvc-legacy</module>
<module>spring-boot-springdoc-2</module> <module>spring-boot-springdoc-2</module>

View File

@ -13,7 +13,7 @@
<parent> <parent>
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId> <artifactId>spring-boot-starter-parent</artifactId>
<version>2.7.11</version> <version>3.1.5</version>
<relativePath/> <relativePath/>
</parent> </parent>
@ -24,8 +24,21 @@
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.amazonaws.serverless</groupId> <groupId>com.amazonaws.serverless</groupId>
<artifactId>aws-serverless-java-container-springboot2</artifactId> <artifactId>aws-serverless-java-container-springboot3</artifactId>
<version>${aws-serverless-java-container-springboot2.version}</version> <version>${aws-serverless-java-container.version}</version>
</dependency>
<dependency>
<groupId>com.amazonaws.serverless</groupId>
<artifactId>aws-serverless-java-container-core</artifactId>
<version>${aws-serverless-java-container.version}</version>
<classifier>tests</classifier>
<type>test-jar</type>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents.client5</groupId>
<artifactId>httpclient5</artifactId>
<version>${httpclient5.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
@ -74,10 +87,11 @@
</build> </build>
<properties> <properties>
<aws-serverless-java-container-springboot2.version>1.9.1</aws-serverless-java-container-springboot2.version> <aws-serverless-java-container.version>2.0.0</aws-serverless-java-container.version>
<maven-shade-plugin.version>3.2.4</maven-shade-plugin.version> <maven-shade-plugin.version>3.3.0</maven-shade-plugin.version>
<maven.compiler.source.version>11</maven.compiler.source.version> <maven.compiler.source.version>11</maven.compiler.source.version>
<maven.compiler.target.version>11</maven.compiler.target.version> <maven.compiler.target.version>11</maven.compiler.target.version>
<httpclient5.version>5.3.1</httpclient5.version>
</properties> </properties>
</project> </project>

View File

@ -13,10 +13,10 @@ import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value; 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.context.SpringBootTest;
import org.springframework.boot.test.web.client.TestRestTemplate; 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.core.ParameterizedTypeReference;
import org.springframework.http.HttpStatus; import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType; import org.springframework.http.MediaType;
@ -54,12 +54,12 @@ public class DisplayBeanIntegrationTest {
@Test @Test
public void givenRestTemplate_whenAccessEndpointUrl_thenHttpStatusOK() throws Exception { public void givenRestTemplate_whenAccessEndpointUrl_thenHttpStatusOK() throws Exception {
ParameterizedTypeReference<Map<String, ContextBeans>> responseType = new ParameterizedTypeReference<Map<String, ContextBeans>>() { ParameterizedTypeReference<Map<String, ContextBeansDescriptor>> responseType = new ParameterizedTypeReference<Map<String, ContextBeansDescriptor>>() {
}; };
RequestEntity<Void> requestEntity = RequestEntity.get(new URI("http://localhost:" + this.mgt + ACTUATOR_PATH + "/beans")) RequestEntity<Void> requestEntity = RequestEntity.get(new URI("http://localhost:" + this.mgt + ACTUATOR_PATH + "/beans"))
.accept(MediaType.APPLICATION_JSON) .accept(MediaType.APPLICATION_JSON)
.build(); .build();
ResponseEntity<Map<String, ContextBeans>> entity = this.testRestTemplate.exchange(requestEntity, responseType); ResponseEntity<Map<String, ContextBeansDescriptor>> entity = this.testRestTemplate.exchange(requestEntity, responseType);
then(entity.getStatusCode()).isEqualTo(HttpStatus.OK); then(entity.getStatusCode()).isEqualTo(HttpStatus.OK);
} }