-
Notifications
You must be signed in to change notification settings - Fork 41.1k
ComponentScan probably works differently since 3.2 or has a bug? #38845
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
Comments
Nothing immediately comes to mind for changes in that area. Are you able to share a sample project that reproduces the problem you're seeing? |
I have created a simple example at demo. |
Thanks for the reproducer. I haven't gotten to the bottom of this yet, but it appears that the problem is fixed in the latest snapshots for Spring Boot 3.2.1. Can you try to build your real project against |
I believe this is a duplicate of spring-projects/spring-framework#31704 |
I think that's right, I'll close this issue then as a duplicate. Thanks Scott for investigating here. |
We have two classes with which we start Spring Boot, one for default (GrafioschtraderApplication) and tests (GTforTest).
Default:
Test:
Reading the other configuration should be excluded in these classes with
@ComponentScan
andexcludeFiltes
. This worked before Spring Boot 3.2. However, since version 3.2,application-test.properties
had to be moved fromsrc/test/resources
tosrc/main/resources
, andapplication-test.properties
is read from the default configuration during execution. Has this behavior changed in Spring Boot 3.2 or is this a bug?The text was updated successfully, but these errors were encountered: