Skip to content

Conversation

@devin-ai-integration
Copy link
Contributor

Modernize auto-configuration testing

This PR modernizes the auto-configuration testing approach as described in issue #289.

Changes

  • Replaced direct use of AnnotationConfigApplicationContext with ApplicationContextRunner
  • Removed @Before and @After methods that are no longer needed with ApplicationContextRunner
  • Replaced EnvironmentTestUtils with .withPropertyValues() method
  • Updated exception handling in tests to work with the new testing approach
  • Replaced lambda-based configuration registration with AutoConfigurations.of()
  • Used .withUserConfiguration() for custom configuration classes

These changes align with Spring Boot's latest recommendations for testing auto-configurations as described in the documentation.

Link to Devin run: https://app.devin.ai/sessions/e3d0a2d95f8e494a80f23ea88decbdaf
Requested by: [email protected]

@devin-ai-integration
Copy link
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

Copy link
Member

@backpaper0 backpaper0 left a comment

Choose a reason for hiding this comment

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

Please remove unused imports.

@backpaper0 backpaper0 merged commit 59f3e12 into master May 18, 2025
6 checks passed
@backpaper0 backpaper0 deleted the devin/1747472230-modernize-auto-configuration-testing branch May 18, 2025 02:20
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