JAVA-31640 :- Upgrade Spring Boot Data (#16207)
Co-authored-by: Amit Pandey <amitpandey@cloud.upwork.com>
This commit is contained in:
parent
429b4700e8
commit
f63ea84918
|
@ -157,6 +157,8 @@
|
||||||
</profiles>
|
</profiles>
|
||||||
|
|
||||||
<properties>
|
<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>
|
<git-commit-id-plugin.version>2.2.4</git-commit-id-plugin.version>
|
||||||
<javafx.version>19</javafx.version>
|
<javafx.version>19</javafx.version>
|
||||||
<start-class>com.baeldung.SpringBootDataApplication</start-class>
|
<start-class>com.baeldung.SpringBootDataApplication</start-class>
|
||||||
|
|
|
@ -6,5 +6,6 @@ spring.datasource.url=jdbc:h2:mem:testdb
|
||||||
spring.datasource.driver-class-name=org.h2.Driver
|
spring.datasource.driver-class-name=org.h2.Driver
|
||||||
spring.datasource.username=sa
|
spring.datasource.username=sa
|
||||||
spring.datasource.password=
|
spring.datasource.password=
|
||||||
|
spring.main.allow-bean-definition-overriding=true
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -44,7 +44,7 @@ public class ContactAppIntegrationTest {
|
||||||
public void givenJsonFormatAnnotationAndJava8DateType_whenGet_thenReturnExpectedDateFormat() throws IOException, ParseException {
|
public void givenJsonFormatAnnotationAndJava8DateType_whenGet_thenReturnExpectedDateFormat() throws IOException, ParseException {
|
||||||
ResponseEntity<String> response = restTemplate.getForEntity("http://localhost:" + port + "/contacts", String.class);
|
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>>>(){});
|
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 {
|
public void givenJsonFormatAnnotationAndLegacyDateType_whenGet_thenReturnExpectedDateFormat() throws IOException {
|
||||||
ResponseEntity<String> response = restTemplate.getForEntity("http://localhost:" + port + "/contacts/javaUtilDate", String.class);
|
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>>>(){});
|
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 {
|
public void givenDefaultDateFormatInAppPropertiesAndLegacyDateType_whenGet_thenReturnExpectedDateFormat() throws IOException {
|
||||||
ResponseEntity<String> response = restTemplate.getForEntity("http://localhost:" + port + "/contacts/plainWithJavaUtilDate", String.class);
|
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>>>(){});
|
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 {
|
public void givenDefaultDateFormatInAppPropertiesAndJava8DateType_whenGet_thenNotApplyFormat() throws IOException {
|
||||||
ResponseEntity<String> response = restTemplate.getForEntity("http://localhost:" + port + "/contacts/plain", String.class);
|
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>>>(){});
|
List<Map<String, String>> respMap = mapper.readValue(response.getBody(), new TypeReference<List<Map<String, String>>>(){});
|
||||||
|
|
||||||
|
|
|
@ -38,7 +38,7 @@ public class ContactAppWithObjectMapperCustomizerIntegrationTest {
|
||||||
public void givenDefaultDateFormatInAppPropertiesAndLegacyDateType_whenGet_thenReturnExpectedDateFormat() throws IOException {
|
public void givenDefaultDateFormatInAppPropertiesAndLegacyDateType_whenGet_thenReturnExpectedDateFormat() throws IOException {
|
||||||
ResponseEntity<String> response = restTemplate.getForEntity("http://localhost:" + this.port + "/contacts/plainWithJavaUtilDate", String.class);
|
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>>>(){});
|
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 {
|
public void givenDefaultDateFormatInAppPropertiesAndJava8DateType_whenGet_thenReturnExpectedDateFormat() throws IOException {
|
||||||
ResponseEntity<String> response = restTemplate.getForEntity("http://localhost:" + this.port + "/contacts/plain", String.class);
|
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>>>(){});
|
List<Map<String, String>> respMap = mapper.readValue(response.getBody(), new TypeReference<List<Map<String, String>>>(){});
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue