Skip to content

Conversation

@corneliusroemer
Copy link
Contributor

@corneliusroemer corneliusroemer commented Dec 17, 2025

resolves #

Screenshot

PR Checklist

  • All necessary documentation has been adapted.
  • The implemented feature is covered by appropriate, automated tests.
  • Any manual testing that has been done is documented (i.e. what exactly was tested?)

🚀 Preview: https://feature-spring-boot-4-exp.loculus.org

@corneliusroemer corneliusroemer linked an issue Dec 17, 2025 that may be closed by this pull request
@corneliusroemer corneliusroemer force-pushed the feature/spring-boot-4-experimental branch from 20c6073 to 31fe5e4 Compare December 17, 2025 17:26
@corneliusroemer corneliusroemer added the preview Triggers a deployment to argocd label Dec 17, 2025
@corneliusroemer corneliusroemer force-pushed the feature/spring-boot-4-experimental branch from fffd07d to 7ca2f68 Compare December 18, 2025 09:28
corneliusroemer and others added 17 commits December 18, 2025 13:49
## Changes

**Build Configuration:**
- Upgrade Spring Boot from 3.5.7 to 4.0.0
- Add spring-boot-jackson2 for Jackson 2 compatibility
- Add spring-boot-starter-flyway (now required explicitly)
- Add spring-boot-test-autoconfigure and spring-boot-webmvc-test
- Add testcontainers-bom:1.20.4 for module management
- Regenerate gradle.lockfile with Spring Boot 4.0 dependencies

**Code Changes:**
- Update DataSourceTransactionManagerAutoConfiguration import (moved to jdbc.autoconfigure package)
- Update @AutoConfigureMockMvc imports in 3 test files (moved to webmvc.test.autoconfigure package)

## Results

✅ Main application compiles successfully
✅ JetBrains Exposed 0.61.0 compatible (no update needed!)
✅ Jackson 2 compatibility working
✅ Spring Framework 7.0.1 integrated
✅ Spring Security 7.0.x working

⚠️ Test compilation has null-safety issues (expected with Spring Framework 7's JSpecify)

## New Dependency Versions

- Spring Framework: 6.2.12 → 7.0.1
- Jackson: 2.19.2 → 2.20.1 (via jackson2 compatibility)
- Flyway: 11.7.2 → 11.14.1
- Tomcat: → 11.0.14
- Testcontainers: → 1.20.4

## Documentation

See tmp/spring-boot-4-migration-findings.md for comprehensive findings.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Update dependencies to tools.jackson.*
- Rename imports from com.fasterxml.jackson to tools.jackson
- Fix usage of immutable ObjectMapper (JsonMapper builder)
- Rename TextNode to StringNode
- Rename JsonSerializer/JsonDeserializer to ValueSerializer/ValueDeserializer
- Update SerializerProvider to SerializationContext in serialize methods
Investigated usage and confirmed jackson-dataformat-yaml is only used in tests (SwaggerUiTest). Moved it from implementation to testImplementation to reduce production dependencies.
…ncies

- Migrated Jackson from com.fasterxml.jackson to tools.jackson group (Jackson 3).
- Moved jackson-dataformat-yaml, io.minio:minio, and org.tukaani:xz to testImplementation as they are not used in production code.
- Restored explicit version for commons-compress.
- Updated gradle.lockfile and formatted code via ktlint.
…ant properties

- Replace custom ObjectMapper bean with JsonMapperBuilderCustomizer in BackendSpringConfig.
- Remove redundant Jackson and bean overriding properties from test application.properties.
- Cleanup SQL_FILE appender in logback-test.xml.
- Consolidate ObjectMapper configurations across production, tests, and database JSONB serialization to ensure consistent behavior (disabled FAIL_ON_UNKNOWN_PROPERTIES and FAIL_ON_NULL_FOR_PRIMITIVES).
- Remove redundant @JsonIgnoreProperties annotations from configuration classes now that global defaults handle them.
- Add TODO(#5754) to document the double-encoding hack in ReleasedDataModel required by the current website consumer.
- Fix regression in BackendApplication where the wrong class name was used for Exposed auto-configuration exclusion, which broke the test suite.
- Update test clients (FilesClient, GetReleasedDataFileSharingEndpointTest) to use the centralized jacksonObjectMapper property instead of creating fresh instances.
@corneliusroemer corneliusroemer force-pushed the feature/spring-boot-4-experimental branch from 7ca2f68 to 0540b46 Compare December 18, 2025 12:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

preview Triggers a deployment to argocd

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Migrate to Jackson 3 as Jackson 2 is deprecated by Spring Boot Upgrade Spring Boot to 4.0

2 participants