美文网首页
Springboot2~项目升级Springboot3~

Springboot2~项目升级Springboot3~

作者: 一花一世界yu | 来源:发表于2023-07-09 16:07 被阅读0次

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

    相关文章

      网友评论

          本文标题:Springboot2~项目升级Springboot3~

          本文链接:https://www.haomeiwen.com/subject/aaesudtx.html