JAVA-31640 :- Upgrade Spring Boot Data (#16207)

Co-authored-by: Amit Pandey <amitpandey@cloud.upwork.com>
This commit is contained in:
Amit Pandey 2024-03-23 17:52:50 +05:30 committed by GitHub
parent 429b4700e8
commit f63ea84918
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 9 additions and 6 deletions

View File

@ -157,6 +157,8 @@
</profiles>
<properties>
<spring-boot.version>3.2.2</spring-boot.version>
<junit-jupiter.version>5.10.2</junit-jupiter.version>
<git-commit-id-plugin.version>2.2.4</git-commit-id-plugin.version>
<javafx.version>19</javafx.version>
<start-class>com.baeldung.SpringBootDataApplication</start-class>

View File

@ -6,5 +6,6 @@ spring.datasource.url=jdbc:h2:mem:testdb
spring.datasource.driver-class-name=org.h2.Driver
spring.datasource.username=sa
spring.datasource.password=
spring.main.allow-bean-definition-overriding=true

View File

@ -44,7 +44,7 @@ public class ContactAppIntegrationTest {
public void givenJsonFormatAnnotationAndJava8DateType_whenGet_thenReturnExpectedDateFormat() throws IOException, ParseException {
ResponseEntity<String> response = restTemplate.getForEntity("http://localhost:" + port + "/contacts", String.class);
assertEquals(200, response.getStatusCodeValue());
assertEquals(200, response.getStatusCode().value());
List<Map<String, String>> respMap = mapper.readValue(response.getBody(), new TypeReference<List<Map<String, String>>>(){});
@ -59,7 +59,7 @@ public class ContactAppIntegrationTest {
public void givenJsonFormatAnnotationAndLegacyDateType_whenGet_thenReturnExpectedDateFormat() throws IOException {
ResponseEntity<String> response = restTemplate.getForEntity("http://localhost:" + port + "/contacts/javaUtilDate", String.class);
assertEquals(200, response.getStatusCodeValue());
assertEquals(200, response.getStatusCode().value());
List<Map<String, String>> respMap = mapper.readValue(response.getBody(), new TypeReference<List<Map<String, String>>>(){});
@ -74,7 +74,7 @@ public class ContactAppIntegrationTest {
public void givenDefaultDateFormatInAppPropertiesAndLegacyDateType_whenGet_thenReturnExpectedDateFormat() throws IOException {
ResponseEntity<String> response = restTemplate.getForEntity("http://localhost:" + port + "/contacts/plainWithJavaUtilDate", String.class);
assertEquals(200, response.getStatusCodeValue());
assertEquals(200, response.getStatusCode().value());
List<Map<String, String>> respMap = mapper.readValue(response.getBody(), new TypeReference<List<Map<String, String>>>(){});
@ -89,7 +89,7 @@ public class ContactAppIntegrationTest {
public void givenDefaultDateFormatInAppPropertiesAndJava8DateType_whenGet_thenNotApplyFormat() throws IOException {
ResponseEntity<String> response = restTemplate.getForEntity("http://localhost:" + port + "/contacts/plain", String.class);
assertEquals(200, response.getStatusCodeValue());
assertEquals(200, response.getStatusCode().value());
List<Map<String, String>> respMap = mapper.readValue(response.getBody(), new TypeReference<List<Map<String, String>>>(){});

View File

@ -38,7 +38,7 @@ public class ContactAppWithObjectMapperCustomizerIntegrationTest {
public void givenDefaultDateFormatInAppPropertiesAndLegacyDateType_whenGet_thenReturnExpectedDateFormat() throws IOException {
ResponseEntity<String> response = restTemplate.getForEntity("http://localhost:" + this.port + "/contacts/plainWithJavaUtilDate", String.class);
assertEquals(200, response.getStatusCodeValue());
assertEquals(200, response.getStatusCode().value());
List<Map<String, String>> respMap = mapper.readValue(response.getBody(), new TypeReference<List<Map<String, String>>>(){});
@ -53,7 +53,7 @@ public class ContactAppWithObjectMapperCustomizerIntegrationTest {
public void givenDefaultDateFormatInAppPropertiesAndJava8DateType_whenGet_thenReturnExpectedDateFormat() throws IOException {
ResponseEntity<String> response = restTemplate.getForEntity("http://localhost:" + this.port + "/contacts/plain", String.class);
assertEquals(200, response.getStatusCodeValue());
assertEquals(200, response.getStatusCode().value());
List<Map<String, String>> respMap = mapper.readValue(response.getBody(), new TypeReference<List<Map<String, String>>>(){});