springboot工程要求必须去继承一个springboot提供的父工程,里面对大量的依赖版本进行了锁定
1.在pom文件中添加
<!--1. 设置父工程: 里面进行版本的锁定-->
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.2.2.RELEASE</version>
</parent>
<!--2. 引入依赖启动器: 里面是一堆需要的依赖的集合-->
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
</dependencies>
2.编写启动类
3.父子工程关键点
然后子工程要加依赖启动器
那么问题来了?
什么是依赖启动器?