From d7fbfa502c113db7f1fd262649310e85769db7f2 Mon Sep 17 00:00:00 2001 From: Dachary Carey Date: Wed, 27 May 2026 10:08:06 -0400 Subject: [PATCH] chore(java-spring): bump Spring Boot to 4.0.6 and refresh deps MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps the Java Spring Mflix sample to Spring Boot 4.0.6, which brings the transitively-managed MongoDB Java Sync Driver from 5.5.2 to 5.6.5 (no GA Spring Boot release currently ships driver 5.7.0 — see DOCSP-59938). Also refreshes other deps to keep the sample current. - Spring Boot 3.5.13 -> 4.0.6 - springboot3-dotenv -> springboot4-dotenv (artifact rename) - springdoc-openapi 2.8.13 -> 3.0.3 (SB4-compatible major line) - langchain4j-voyage-ai 1.11.0-beta19 -> 1.15.0-beta25 - testcontainers junit-jupiter/mongodb -> testcontainers-junit-jupiter/ testcontainers-mongodb (testcontainers 2.0 module rename) - Add spring-boot-starter-webmvc-test (SB4 split @WebMvcTest out of spring-boot-starter-test) and update its import path - Add spring-boot-jackson2 to opt back into Jackson 2 (SB4 defaults to Jackson 3); rename spring.jackson.* properties to spring.jackson2.* and drop write-dates-as-timestamps (Jackson 3 removed the feature and ISO-8601 is now the default) - Drop commons-lang3 CVE-2025-48924 workaround (SB4 BOM ships 3.19.0, past the 3.18.0 fix) JIRA: DOCSP-59938 --- mflix/server/java-spring/pom.xml | 39 ++++++++----------- .../src/main/resources/application.properties | 3 +- .../controller/MovieControllerTest.java | 2 +- 3 files changed, 18 insertions(+), 26 deletions(-) diff --git a/mflix/server/java-spring/pom.xml b/mflix/server/java-spring/pom.xml index a814870..938050b 100644 --- a/mflix/server/java-spring/pom.xml +++ b/mflix/server/java-spring/pom.xml @@ -8,7 +8,7 @@ org.springframework.boot spring-boot-starter-parent - 3.5.13 + 4.0.6 @@ -20,12 +20,11 @@ 21 - 2.8.13 + 3.0.3 5.1.0 - 3.20.0 1.13.0 1.17.8 - 1.11.0-beta19 + 1.15.0-beta25 @@ -50,7 +49,7 @@ me.paulschwarz - springboot3-dotenv + springboot4-dotenv ${dotenv.version} @@ -61,24 +60,11 @@ provided - - - org.apache.commons - commons-lang3 - ${commons.lang3.version} - - org.springdoc springdoc-openapi-starter-webmvc-ui ${springdoc.version} - - - org.apache.commons - commons-lang3 - - @@ -88,24 +74,31 @@ test + + + org.springframework.boot + spring-boot-starter-webmvc-test + test + + org.testcontainers - junit-jupiter + testcontainers-junit-jupiter test org.testcontainers - mongodb + testcontainers-mongodb test - + - com.fasterxml.jackson.core - jackson-databind + org.springframework.boot + spring-boot-jackson2 diff --git a/mflix/server/java-spring/src/main/resources/application.properties b/mflix/server/java-spring/src/main/resources/application.properties index 47bd6d0..1e89e1b 100644 --- a/mflix/server/java-spring/src/main/resources/application.properties +++ b/mflix/server/java-spring/src/main/resources/application.properties @@ -36,8 +36,7 @@ logging.logback.rollingpolicy.max-file-size=5MB logging.logback.rollingpolicy.max-history=5 # Jackson Configuration (JSON serialization) -spring.jackson.default-property-inclusion=non_null -spring.jackson.serialization.write-dates-as-timestamps=false +spring.jackson2.default-property-inclusion=non_null # API Documentation (Swagger/OpenAPI) springdoc.api-docs.path=/api-docs diff --git a/mflix/server/java-spring/src/test/java/com/mongodb/samplemflix/controller/MovieControllerTest.java b/mflix/server/java-spring/src/test/java/com/mongodb/samplemflix/controller/MovieControllerTest.java index 4eacf86..1b02f8f 100644 --- a/mflix/server/java-spring/src/test/java/com/mongodb/samplemflix/controller/MovieControllerTest.java +++ b/mflix/server/java-spring/src/test/java/com/mongodb/samplemflix/controller/MovieControllerTest.java @@ -34,7 +34,7 @@ import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.boot.test.autoconfigure.web.servlet.WebMvcTest; +import org.springframework.boot.webmvc.test.autoconfigure.WebMvcTest; import org.springframework.http.MediaType; import org.springframework.test.context.bean.override.mockito.MockitoBean; import org.springframework.test.web.servlet.MockMvc;