Spring Boot 4: Updating Open Source Standards

In late November 2025 Spring Boot 4 was released, built on the new Spring Framework 7. There are a number of API, starter packaging changes and a major api change for JSON parsing to use Jackson 3. Also Amazon Web Services SDK 1 reached end of life so we updated all utilities to use SDK 2. JUnit 4 dependencies were also removed so any older tests were update to JUnit 5 and JAssert.

We left our JVM at 21 and made the 25 upgrade a separate activity.

See OSS Github 16.0.3

Our changes to make version 16 compatible with Spring Boot 4 included:

1. Version and Dependency Management

  • Major Version Bump: The project version was upgraded from 15.x to 16.x to reflect major changes.
  • Spring Boot 4 Alignment: Updated parent POMs and library dependencies to align with Spring Boot 4 standards.
  • Dependency Cleanup:
    • Removed JUnit 4 dependencies in favor of JUnit 5.
    • Switched from spring-boot-starter-json to spring-boot-starter-jackson.
    • Completely excluded commons-logging to prevent it from “sneaking in” via other starters (e.g., spring-boot-test-starter).
  • Plugin Updates: Updated several Maven plugins, including versions-maven-plugin (to 2.20.1) and JaCoCo configurations to ensure compatibility with the new environment.

2. Jackson 3 Migration

  • Namespace Shift: Migrated from the traditional com.fasterxml.jackson namespace to the new tools.jackson namespace.
  • JsonLoader Refactoring: Updated JsonLoader to use JsonMapper instead of ObjectMapper.
  • New Configuration API:
    • Introduced JsonMapperPrototype to provide a standardized way to build “boot-like” mappers.
    • Added LimeJacksonJsonConfiguration which provides a @ConditionalOnMissingBean fallback for JsonMapper.
  • Behavioral Adjustments: Disabled FAIL_ON_NULL_FOR_PRIMITIVES by default to maintain “sane” behavior across the library’s typical use cases.

3. Testing and Validation Enhancements

  • New Validation Support: Introduced ValidationSupport and ValidationSupportConfiguration in test-utilities. This provides a fluent API (hardValidate) for asserting that DTOs and Beans satisfy Jakarta Bean Validation constraints (e.g., @NotNull) during tests.
  • Test Refactoring: Factorized validation logic and cleaned up various unit tests to match the new library versions.

4. Infrastructure and Docker

  • LocalStack Reliability: Updated docker-compose.yml across multiple modules to fix timing failures during CI/CD.
    • Increased start_period for health checks from 1s to 30s.
    • Enhanced health check commands to verify multiple services (sqss3sns) as they are started lazily in LocalStack.
    • Configured additional port ranges for LocalStack services.

5. External API Updates (GitHub)

  • GitHub API Migration: Updated the jcabi-github implementation in github-utilities.
    • Renamed usages of Github/RtGithub to GitHub/RtGitHub to match library changes.
    • Migrated from javax.json to jakarta.json namespaces for JSON processing within the GitHub integration.
  • Application Cleanup: Removed unused properties (like workflowRepositoryId) and added @SuppressWarnings for specific linting rules.

6. General Cleanup

  • Suppressed Javadoc missing warnings.
  • Removed unnecessary comments and usage of “ant export properties” in build configurations.
  • Corrected various Docker startup and timing issues that were causing flaky tests.

References