What is Auto Configuration in Spring?

What is Auto Configuration in Spring?

AutoConfiguration is the most important feature in Spring Boot. Spring Bootauto-configuration attempts to automatically configure your Spring applicationbased on the jar dependencies that you have added

SpringBoot looks configurations at

a)Frameworks available on the CLASSPATH

b)Existing configuration for the application.

Basedon these, Spring Boot provides basic configuration needed to configure theapplication with these frameworks. This is called Auto Configuration.

Youneed to opt-in to auto-configuration by adding the @EnableAutoConfiguration or@SpringBootApplication annotations to one of your @Configuration classes.

You should only ever addone @SpringBootApplicationor @EnableAutoConfigurationannotation. Wegenerally recommend that you add one or the other to your primary @Configurationclass only

Read More →
Search
R4R Team
R4Rin Top Tutorials are Core Java,Hibernate ,Spring,Sturts.The content on R4R.in website is done by expert team not only with the help of books but along with the strong professional knowledge in all context like coding,designing, marketing,etc!