The second annotation in the sample code is @enableAutoConfiguration.

This annotation tells Spring Boot how to “guess” how you want To configure Spring. This so-called guessing process is not really guessing, but based on the dependencies you add. When the spring-boot-starter-web dependency is added, Spring will add Tomcat and Spring MVC dependencies. This automatic configuration assumes that you will be deploying a Web application and setting up the Spring framework.

Starters and Auto – configuration

Auto-configuration is used to work well with Spring’s “Starters.”

But if you have other options, your Spring autoconfiguration will try to do that too.

Or you can go with a non-starters reliance. Spring Boot will still try to automatically configure your application.

www.ossez.com/t/spring-bo…