Springboot2~项目升级Springboot3~

2023-07-09  本文已影响0人  一花一世界yu

一、在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>

上一篇 下一篇

猜你喜欢

热点阅读