Saturday, May 27, 2017

How Does Spring Boot Decide What Default Configurations to include?

It will consider some classes from 'spring-boot-autoconfigure' jar file.

When we start a spring boot application , it consults these classes in 'spring-boot-autoconfigure' jar file.
Depending upon certain conditions it applies these auto configuration.

for Example above its checking to see if Dispatcher Servlet is on class path. So if it finds those components in place then it knows it needs to apply its AutoConfiguration.

and here is how its used. This Code simulates our web.xml entries.

If you want to Override any of these bean definition simply....

No comments: