Spring Boot 2.7 introduced a new META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports file for registering auto-configurations, while maintaining backwards compatibility with registration in spring.factories. With this release, support for registering auto-configurations in spring.factories using the org.springframework.boot.autoconfigure.EnableAutoConfiguration key has been removed in favor of the imports file. Other entries in spring.factories under other keys are unaffected.
Auto-configuration Registration
If you have created your own auto-configurations, you should move the registration from spring.factories under the org.springframework.boot.autoconfigure.EnableAutoConfiguration key to a new file named META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports. Rather than a single comma-separate list, each line contains the fully qualified name of an auto-configuration class. See the included auto-configurations for an example.
For backwards compatibility, entries in spring.factories will still be honored.
Error: Beans declared in
TotpAutoConfiguration.java
file are not created after with Spring 3.2.1.its throwing below error ''Cause: The spring.factory file is deprecated in spring boot 2.7 and its completely removed in spring 3.2.1.
Fix: added
dev.samstevens.totp.spring.autoconfigure.TotpAutoConfiguration
entry in filetotp-spring-boot-starter/src/main/resources/META-INF/org.springframework.boot.autoconfigure.AutoConfiguration
Reference from spring doc:- https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-3.0-Migration-Guide#auto-configuration-files
https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-2.7-Release-Notes#auto-configuration-registration