@SpringBootApplication We use this annotation to mark the main class of a Spring Boot application : 1 2 3 4 5 6 7 @SpringBootApplication class VehicleFactoryApplication { public static void main(String[] args) { SpringApplication.run(VehicleFactoryApplication. class , args); } } @SpringBootApplication encapsulates @Configuration , @EnableAutoConfiguration , and @ComponentScan annotations with their default attributes. @EnableAutoConfiguration @EnableAutoConfiguration , as its name says, enables auto-configuration. It means that Spring Boot looks for auto-configuration beans on its classpath and automatically applies them. Note, that we have to use this annotation with @Configuration : 1 2 3 @Configuration @EnableAutoConfiguration class VehicleFactoryConfig {} ...