SpringBoot入门(二)场景启动器
1.pom文件
1.1父项目
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.5.2.RELEASE</version>
</parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-dependencies</artifactId>
<version>1.5.2.RELEASE</version>
<relativePath>../../spring-boot-dependencies</relativePath>
</parent>
SpringBoot的版本仲裁中心:
以后我们导入依赖默认是不需要写版本;(没有在deprndencies管理的依赖需要声明版本号)
1.2 jar包
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
spring-boot-starter:spring-boot场景启动器,帮我们daoruweb模块正常运行所需要的依赖;
SpringBoot将所有的功能场景都抽取出来,做成一个个Starters
场景启动器的链接:
https://docs.spring.io/spring-boot/docs/1.5.9.RELEASE/reference/htmlsingle/#using-boot-starter