Migrate code for Spring Boot 3.2.3 → 4.0.3 breaking changes

Spring Boot 4.0 introduces several breaking changes due to modularisation and the Jackson 3.x upgrade that require source-level fixes beyond the version bump.

Changes

  • Jackson 3.x (tools.jackson): Spring Boot 4.0 ships Jackson 3.x under the new tools.jackson groupId. The auto-configured bean is now tools.jackson.databind.ObjectMapper, not com.fasterxml.jackson.databind.ObjectMapper.

    • Removed explicit com.fasterxml.jackson.core:jackson-databind dependency from pom.xml (managed by BOM)
    • Updated GeminiService imports: com.fasterxml.jacksontools.jackson
  • MockMvc test module split: @AutoConfigureMockMvc moved out of spring-boot-test-autoconfigure into the new spring-boot-webmvc-test module.

    • Added spring-boot-starter-webmvc-test test dependency to pom.xml
    • Updated import in TaxonomyApplicationTests: org.springframework.boot.test.autoconfigure.web.servletorg.springframework.boot.webmvc.test.autoconfigure
// Before
import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.ObjectMapper;
import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc;

// After
import tools.jackson.core.type.TypeReference;
import tools.jackson.databind.ObjectMapper;
import org.springframework.boot.webmvc.test.autoconfigure.AutoConfigureMockMvc;

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Merge request reports

Loading