-
Notifications
You must be signed in to change notification settings - Fork 41.5k
Description
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.
- https://github.com/zromano/SpringBoot-3.0.0-With-AutoConfig
- https://github.com/zromano/SpringBoot-2.7.5-With-AutoConfig
Also worth noting, if you add @ComponentScan("com.lib")
to DemoApplication.java
in the SpringBoot 3.0.0 example it will work again, but we shouldn't need to add that since we have the spring.factories
in the lib.