1、依赖替换
删除所有spring相关包,引入下列maven依赖
引入spring-boot的父级依赖管理,能在很大程度上避免依赖版本冲突,而且所有外部开源的公共依赖都无需填写依赖版本。依赖管理会自动处理相关依赖版本
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.6.3</version>
</parent>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId&