-
Notifications
You must be signed in to change notification settings - Fork 41.2k
Bug with AutoConfigure using spring.factories in SpringBoot 3 #33413
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
You can find more about it in the migration guide of 2.7 |
Spring Boot 3.0 requires AutoConfiguration classes to be specified in a |
Ah,I'm glad it's not a bug! Thank you both!! That wasn't called out in the 3.0.0 release notes and I didn't think to look back at 2.7 notes. Hopefully this thread will help someone else if they have the same issue! |
The 3.0 release notes link to the dedicated migration guide, which is where most of the information needed when migrating from 2.7 to 3.0 is located. |
Hi team, I started looking into upgrading to SpringBoot 3 and I think I may have stumbled upon a bug.
We have a library that uses
spring.factories
to make Spring automatically recognize a configuration class in a library. After upgrading to SpringBoot 3, the application using the library will no longer recognize configuration class and use it to create beans.To make things easier, I made two simple apps that repro the issue and show that it will autoconfigure and create a bean on SpringBoot 2.7.5 and it will not on SpringBoot 3. You can just run the SpringBootTest in either repo to see the issue.
Also worth noting, if you add
@ComponentScan("com.lib")
toDemoApplication.java
in the SpringBoot 3.0.0 example it will work again, but we shouldn't need to add that since we have thespring.factories
in the lib.The text was updated successfully, but these errors were encountered: