Skip to content

Sanitize Spring Boot related dependencies#6088

Closed
ericbottard wants to merge 2 commits into
spring-projects:mainfrom
ericbottard:enforce-deps
Closed

Sanitize Spring Boot related dependencies#6088
ericbottard wants to merge 2 commits into
spring-projects:mainfrom
ericbottard:enforce-deps

Conversation

@ericbottard
Copy link
Copy Markdown
Member

With this commit, we ensure that

  • the main codebase does NOT depend on spring-boot
  • the autoconfigure modules do depend on boot, and ALL dependencies should be depended upon with optional=true
  • the starters modules depend on the autoconfigure module, and drag the required dependencies

With this commit, the main codebase is fixed so that
the spring-ai core modules do NOT depend on spring boot.

Only the xx-autoconfigure-yy modules should introduce
a dependency on spring boot, and only the xx-starter-yy modules
should introduce a dependency on the corresponding xx-autoconfigure-yy module.

It is fine for modules to depend on spring boot test starters though.

Signed-off-by: Eric Bottard <eric.bottard@broadcom.com>
Also add a maven enforcer rule to ensure the codebase
does not depend on spring-boot.

Signed-off-by: Eric Bottard <eric.bottard@broadcom.com>
Copy link
Copy Markdown
Contributor

@sdeleuze sdeleuze left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

<artifactId>spring-boot-autoconfigure-processor</artifactId>
<optional>true</optional>
</dependency>

Copy link
Copy Markdown
Contributor

@sdeleuze sdeleuze May 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does not hurt but multiple empty lines could be removed here

@sdeleuze sdeleuze assigned ericbottard and unassigned sdeleuze May 20, 2026
@sdeleuze sdeleuze added this to the 2.0.0-M7 milestone May 20, 2026
@sdeleuze sdeleuze changed the title Sanitise all dependencies, esp. for auto-configurations and starters Sanitize Spring Boot related dependencies May 20, 2026
@sdeleuze sdeleuze added enhancement New feature or request code cleanup labels May 20, 2026
@ilayaperumalg
Copy link
Copy Markdown
Member

Rebased, squashed and merged via 99b6bce

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

code cleanup enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants