spring-boot-starter场景启动器
1、Spring Boot将所有的功能都抽取出来,做成一个个的starters(启动器),只需要在项目里引入这些的starter相关的场景依赖都会导入进来,要用什么功能就导入什么场景的。
例如 spring-boot-starter-web:导入了web模块正常运行所依赖的组件。
主程序类、主入口
1、@SpringBootApplication:被标注的类表示为SpringBoot的主配置类,Spring Boot应当启动这个类的main方法来启动项目。
@SpringBootApplication
public class hello {
public static void main(String[] args) {
SpringApplication.run(hello.class,args);
}
}