Hard java spring

10. What is the role of SpringFactoriesLoader?

Sample answer: "SpringFactoriesLoader is a Spring Framework class that loads implementations of an interface listed in META-INF/spring.factories files on the classpath. Boot still uses it for things like listeners and initializers. But since Boot 3.0 it is not how auto-configurations are registered. Boot 2.7 added the AutoConfiguration.imports file, and 3.0 removed the old EnableAutoConfiguration key in spring.factories."

Outdated answer to avoid: "auto-configuration is loaded through spring.factories" is wrong for Boot 3.

Sources (3)
  1. SpringFactoriesLoader javadoc
  2. Boot 2.7 release notes
  3. Boot 3.0 migration guide