Auto-Configuration

Learn what Spring Boot auto-configurations are and how they make the developer's life easy.

Configuration bloat

As we have seen in our conventional Billionaire’s Club lesson, creating a simple web application requires configuring essential Spring beans before the start of actual development.

For example, when we use Spring MVC, we need to configure Component scan, Dispatcher Servlet, view resolver, etc.

When we use hibernate/JPA in our Spring application, we need to configure DataSource, a connection pool, EntityManager and Transaction Manager, among other things.

Spring boot - think differently

Can we do this in a smarter way? Think of configuring:

  • A DataSource, if the Hibernate JAR is on the classpath.
...