Skip to content

No DependsOnDatabaseInitialization in Spring Framework modules #760

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Aug 13, 2025

Conversation

MBoegers
Copy link
Contributor

@MBoegers MBoegers commented Aug 7, 2025

What's changed?

added a precondition to check the modules classpath for spring-boot dependency. Within spring framwork modules this can otherwise lead to compilation failures

What's your motivation?

Prevent the adition of @DependsOnDatabaseInitialization in Spring Framework only modules.

Anything in particular you'd like reviewers to focus on?

Anyone you would like to review specifically?

Have you considered any alternatives or workarounds?

Any additional context

no unit test provided due to class path pollution in tests see.
Done manual tests with CLI.

Checklist

  • I've added unit tests to cover both positive and negative cases
  • I've read and applied the recipe conventions and best practices
  • I've used the IntelliJ IDEA auto-formatter on affected files

@MBoegers MBoegers self-assigned this Aug 7, 2025
@MBoegers MBoegers added bug Something isn't working recipe Recipe requested labels Aug 7, 2025
@github-project-automation github-project-automation bot moved this to In Progress in OpenRewrite Aug 7, 2025
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Some suggestions could not be made:

  • src/test/java/org/openrewrite/java/spring/http/SimplifyWebTestClientCallsTest.java
    • lines 21-20
    • lines 42-41
    • lines 98-138

@github-project-automation github-project-automation bot moved this from In Progress to Ready to Review in OpenRewrite Aug 7, 2025
@MBoegers
Copy link
Contributor Author

MBoegers commented Aug 8, 2025

will quick check the CI before merging

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Some suggestions could not be made:

  • src/test/java/org/openrewrite/java/spring/http/SimplifyWebTestClientCallsTest.java
    • lines 21-20
    • lines 42-41
    • lines 98-138

@MBoegers
Copy link
Contributor Author

MBoegers commented Aug 8, 2025

PR blocked by false results of ModuleHasDependencies openrewrite/rewrite-java-dependencies#149

…entAndBeanInitializationOrderingUnconditionally.java

Co-authored-by: Tim te Beek <[email protected]>
@MBoegers MBoegers merged commit 79e80b9 into main Aug 13, 2025
2 checks passed
@MBoegers MBoegers deleted the boeg/stop-DependsOnDatabaseInitialization-in-framework branch August 13, 2025 11:20
@github-project-automation github-project-automation bot moved this from Ready to Review to Done in OpenRewrite Aug 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working recipe Recipe requested
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants