Skip to content

Conversation

@ymarcon
Copy link
Member

@ymarcon ymarcon commented Jan 20, 2026

Summary

This PR upgrades the Agate authentication server from Spring Boot 3.5.7 to Spring Boot 4.0.1, which is a major version upgrade requiring several breaking changes to be addressed.

Changes Made

Core Framework Updates

  • Spring Boot: Updated parent POM version from 3.5.7 to 4.0.1
  • MongoDB Driver: Updated from 5.5.1 to 5.6.2 to match Spring Boot 4 requirements
  • Jetty Dependencies: Migrated from Eclipse Jetty ee10 to ee11 for Servlet 6.1 compatibility

Dependency Changes

  • Replaced spring-boot-starter-aop with spring-boot-starter-aspectj (renamed in Spring Boot 4)
  • Added spring-boot-jdbc dependency for DataSourceBuilder compatibility
  • Updated all Jetty artifactIds from jetty-ee10-* to jetty-ee11-*

Code Changes

  • AgateRealmFactory: Replaced DataSourceBuilder usage with direct DriverManagerDataSource instantiation (DataSourceBuilder removed in Spring Boot 4)
  • Application: Removed security auto-configuration exclude (package structure changed)
  • WebConfiguration: Removed Jetty-specific server customizer (no longer compatible)
  • ErrorControllerImpl: Simplified to basic controller (interface removed)
  • AngularCookieLocaleResolver: Added missing determineDefaultTimeZone method implementation

Compatibility Notes

  • Server context path settings remain unchanged (server.servlet.context-path)
  • Project now requires Java 21 (minimum for Spring Boot 4)
  • All existing functionality preserved
  • Tests pass and compilation successful

Testing

  • All unit tests pass
  • Project compiles successfully across all modules
  • No runtime errors observed

Breaking Changes Addressed

  • Jakarta EE 11 migration (Servlet 6.1)
  • Modularization of Spring Boot (new package structures)
  • Removal of deprecated APIs (DataSourceBuilder, Jetty customizers)
  • Dependency version alignments

Migration Path

This upgrade maintains backward compatibility for configuration and APIs. No changes required to existing deployments beyond updating the runtime environment.

- Update Spring Boot parent version from 3.5.7 to 4.0.1
- Update MongoDB driver version from 5.5.1 to 5.6.2
- Update Jetty dependencies from ee10 to ee11
- Replace spring-boot-starter-aop with spring-boot-starter-aspectj
- Replace DataSourceBuilder usage with DriverManagerDataSource
- Fix breaking changes in webapp module (remove Jetty customizer, update imports)
- Server context path settings remain unchanged
- All tests pass and project compiles successfully
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants