文章目录

1.概述
我们先来了解一下 @SpringBootApplication 是什么,以及如何在一个简单的 Spring Boot 应用程序中使用它。我们先看看 Spring Team 在源码中对它的定义是什么?
Indicates a configuration class that declares one or more @Bean methods and also triggers auto-configuration and component scanning. This is a convenience annotation that is equivalent to declaring @Configuration, @EnableAutoConfiguration and @ComponentScan.
表示一个配置类,它声明了一个或多个@Bean方法,也触发了自动配置和组件扫描。这是一个方便的注解,相当于声明了@Configuration、@EnableAutoConfiguration和@ComponentScan。
从上面的定义我们可以看出,