Auto Configuration
Auto-configuration is the absolute core feature behind Spring Boot.
How it works
When you decorate your main class with the generic @SpringBootApplication annotation, it aggregates exactly 3 specific core annotations:
@EnableAutoConfiguration: Automatically registers database beans and web beans intelligently.@ComponentScan: Scans local package directories systematically to find your custom@Serviceand@Controllerclasses.@Configuration: Marks the class as a custom Bean source.
Spring Boot parses your pom.xml. If the framework sees that the H2 memory database dependency is loaded, but detects absolutely no explicit manual JDBC connection mapping inside your application.properties, it safely configures a default in-memory database automatically on startup.