
Spring Boot supports following Conditional Annotations for AutoConfiguration classes:

You can customize Spring Auto Configuration by creating your own autoconfiguration module with Auto Configuration Class.

spring.factories file, located in META-INF/spring.factories location on the classpath, is used by Auto Configuration mechanism to locate Auto Configuration Classes. Each module that provides Auto Configuration Class needs to have METAINF/spring.factories file with org.springframework.boot.autoconfigure.EnableAutoConfiguration entry that will point Auto Configuration Classes.

DataSource and JdbcTemplate are configured by Auto Configuration Classes defined in spring-boot-autoconfigure module.

Yes, Spring Boot is performing component scan, because @SpringBootApplication annotation is enabling component scanning with usage of @ComponentScan annotation.

@SpringBootApplication annotation is supposed to be used on top of the class and it was introduced for convenience. Usage of @SpringBootApplication annotation is equivalent to usage of following three annotations:

@EnableAutoConfiguration annotation turns on auto-configuration of Spring Context. Auto-configuration tries to guess Spring Beans that should be created for your application based on configured dependencies and configurations with @ConditionalOn... annotations.

Spring Boot knows what to configure by usage of Auto Configuration Classes defined in starter modules. Spring Boot searches for META-INF/spring.factories on classpath, whenever entry org.springframework.boot.autoconfigure.EnableAutoConfiguration is encountered in this file, Auto Configuration Class pointed by this property is loaded.

Spring Boot supports following embedded containers:

WAR (Web Application Archive) is a file that represents web module. WAR cannot be executed in standalone mode, it needs to be deployed to Application Server like Tomcat or WildFly.