springboot建立完成后在pom中有Springboot父依赖
<parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>2.6.5</version> <relativePath/> <!-- lookup parent from repository --> </parent>
他会使你的项目成为Springboot的子项目
进入<artifactId>spring-boot-starter-parent</artifactId> Ctrl+单击
里面在点击
<artifactId>spring-boot-dependencies</artifactId>
这样可以看到Springboot的所有依赖
springboot里面包含了如mysql连接jar包他们都有默认配置的版本 要改变这个版本
我们先要搜索一下他存不存在
他存在的话我们可以看到他的version号被取缔了
<version>${mysql.version}</version>
我们可以在自己项目的pom中用
properties标签来修改版本:
<properties> <java.version>1.8</java.version> <mysql.version>8.0.28</mysql.version> </properties>
这样直接配置属性来修改对应的版本