@SpringBootApplication包括@SpringBootConfiguration、@EnableAutoConfiguration、@ComponentScan

包括了三个注解

@SpringBootConfiguration

@EnableAutoConfiguration

@ComponentScan

##@SpringBootConfiguration
读取配置文件,配置文件的路径是当前根目录(src/main/resources/application.yml(application.properties)等)
##EnableAutoConfiguration
开启自动配置,扫描当前的所有依赖的jar包,发现新的依赖出现将会将会根据依赖完各种自动配置(扫描start_web,自动配置内置tomcat默认路径、端口;依赖了rabbitmq,自动配置rabbitTemble)
##ComponetScan
属于Spring框架(@Component,@Service,@Controller,@Repository,@Entity),扫描范围默认情况下是启动类所在的包及其子包

说明 参考:https://blog.csdn.net/bugxqm/article/details/84978752

道法自然
原文地址:https://www.cnblogs.com/jiduoduo/p/14656708.html