一、在pom中升級springboot依賴到3.0.0
image.png
二、在pom文件中修改jdk版本到17,springboot3版本要求最低兼容版本為17
image.png
三、pom文件中mybaties對應springboot依賴修改
image.png
四、更改idea配置中項目依賴jdk
1、Project Structrue project改為17
image.png
2、Project Structrue Moudles改為17
image.png
3、java compile 改為17
image.png
4、maven配置setting.xml為17
<profile>
<id>jdk-17</id>
<activation>
<activeByDefault>true</activeByDefault>
<jdk>17</jdk>
</activation>
<properties>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
<maven.compiler.compilerVersion>17</maven.compiler.compilerVersion>
</properties>
</profiles>
5、maven runner
image.png
6、項目運行環境修改
image.png
五、升級mybties依賴與mybaties-plus等版本
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-boot-starter</artifactId>
<version>3.5.3.1</version>
</dependency>