Skip to content

[WIP] DO NOT MERGE!!!! - Springboot 4.0.x upgrade #3221

Draft
nrknithin wants to merge 2 commits intoapache:mainfrom
nrknithin:spring-boot-4_0
Draft

[WIP] DO NOT MERGE!!!! - Springboot 4.0.x upgrade #3221
nrknithin wants to merge 2 commits intoapache:mainfrom
nrknithin:spring-boot-4_0

Conversation

@nrknithin
Copy link
Copy Markdown

@nrknithin nrknithin commented Apr 28, 2026

Kie-Issue: apache/incubator-kie-issues#2288

Related PRs

Summary

Upgrade optaplanner-spring-integration (autoconfigure + starter) from Spring Boot 3.5.12 to 4.0.5 and Spring Framework 6.2.17 to 7.0.6.

What changed

build/optaplanner-build-parent/pom.xml

  • version.org.springframework.boot 3.5.124.0.5
  • version.org.springframework 6.2.177.0.6
  • version.ch.qos.logback 1.5.251.5.32 (matches SB 4.0.x line)
  • Added spring-boot-persistence to dependencyManagement (new module in SB 4.0; see entity-scan import migration below)
  • Maven Enforcer bannedDependencies updated: added commons-logging:commons-logging:::compile to allow commons-logging from Spring Framework 7.x

optaplanner-spring-integration/optaplanner-spring-boot-autoconfigure/pom.xml

  • Added spring-boot-persistence dependency (needed for EntityScan in SB 4.0)
  • Java imports — EntityScan/EntityScanPackages/EntityScanner moved package

OptaPlannerAutoConfiguration.java
ChainedSpringTestConfiguration.java
GizmoSpringTestConfiguration.java
MultiModuleSpringTestConfiguration.java
NoConstraintsSpringTestConfiguration.java

  • Imports changed from org.springframework.boot.autoconfigure.domain.*org.springframework.boot.persistence.autoconfigure.* .

Why

  • Spring Boot 4.0 extracted persistence-related auto-configuration into a new spring-boot-persistence module and moved EntityScan/EntityScanPackages/EntityScanner to org.springframework.boot.persistence.autoconfigure. The old package no longer exists in SB 4.0, so any code using @EntityScan must update its imports and the new module must be on the classpath.

  • Spring Framework 7.x reverted to depending on commons-logging directly (architectural change from Spring 6.x's spring-jcl bridge). The enforcer rule that bans commons-logging:commons-logging had to allow it specifically when it comes from Spring Framework 7.x.

Verified with a full mvn clean install (all modules pass — including 5 Spring autoconfigure test configurations and Quarkus integration tests).

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.

1 participant