-
Notifications
You must be signed in to change notification settings - Fork 40.2k
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
@ComponentScan on a test class is processed when creating a test context but is not included in the context's cache key #31577
Comments
Thanks for the report and sample.
It doesn't for me. After changing the JPA imports to I believe the problem is due to context caching and test ordering. The gist shows that The use of I'd like to discuss this with the rest of the team so that we can decide what to do. We could update the code that generates the cache key to consider |
Thanks @wilkinsona. My goal is use the I also verified this is failing under my previous SB version of 2.5.3. (I swear it was working under Maven then too! LOL) |
You can use |
We're going to try and support |
Thanks @philwebb. And thanks @wilkinsona - I had assumed |
I have the following test, which works okay under Maven & Spring Boot 2.x.
AuthorDao bean fails to load when running under Maven and Spring Boot M3.
Works as expected when executing test under IntelliJ w/ Spring Boot M3.
This only is failing when running in a Maven context.
Error:
Gist of full build console output.
See complete project here. Note: Use branch "author-add-dao". (project is setup to run against local MySQL db using profile 'local' - sql init scripts under /src/scripts)
The text was updated successfully, but these errors were encountered: