SpringBoot项目要继承SpringBoot的起步依赖spring-boot-starter-parent
spring-boot-starter-parent
已经对spring进行了一些默认的配置
导入spring-boot-starter-parent
之后,其他先关依赖就不用填写版本,由此包统一管理
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.4.2</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>