Share:- Whatsapp Facebook Facebook

------------------------------------- Welcome to Developerhelpway Q&A, where you can ask questions and receive answers from other members of the community.

Categories

0 votes
16 views
How to register a custom auto-configuration?
in Spring Boot by

1 Answer

0 votes
To register auto-configuration class with spring boot, we must have its fully-qualified name listed under the EnableAutoConfiguration key in the META-INF/spring.factories file:

org.springframework.boot.autoconfigure.EnableAutoConfiguration=com.baeldung.autoconfigure.CustomAutoConfiguration

If we make a project with Maven, that file should be placed in the resources/META-INF directory, which will end up in the mentioned location during the package phase.
by (1.6k points)
...