当前使用版本(必填,否则不予处理)

3.5.3.1

Java && Pom依赖版本

Dependence Version
Java corretto-17.0.6
spring-boot-starter-parent 3.0.2
spring-boot-starter-web 3.0.2
mybatis-plus-boot-starter 3.5.3.1
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>org.example</groupId>
    <artifactId>generic-programing</artifactId>
    <version>1.0-SNAPSHOT</version>
    <packaging>pom</packaging>
    <modules>
        <module>rbac</module>
    </modules>

    <properties>
        <maven.compiler.source>17</maven.compiler.source>
        <maven.compiler.target>17</maven.compiler.target>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    </properties>

    <!--springboot父级依赖-->
    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>3.0.2</version>
        <relativePath/>
    </parent>

    <dependencies>

        <!--springboot mvc-->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
            <version>3.0.2</version>
        </dependency>

        <!--ORM Framework-->
        <!-- https://mvnrepository.com/artifact/com.baomidou/mybatis-plus-boot-starter -->
        <dependency>
            <groupId>com.baomidou</groupId>
            <artifactId>mybatis-plus-boot-starter</artifactId>
            <version>3.5.3.1</version>
        </dependency>


        <!-- https://mvnrepository.com/artifact/com.github.jeffreyning/mybatisplus-plus -->
        <dependency>
            <groupId>com.github.jeffreyning</groupId>
            <artifactId>mybatisplus-plus</artifactId>
            <version>1.7.2-RELEASE</version>
        </dependency> 

    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.8.1</version>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>2.22.2</version>
            </plugin>
        </plugins>
    </build>

</project>

该问题是如何引起的?

@@启动报错 generic-programing.zip

重现步骤(如果有就写完整)

MyBatis-Plus mybatis-plus不支持springboot3.0, 紧急‼️

报错信息

项目地址:

Error creating bean with name 'sysMenuMapper' defined in file [/Users/xxx/xxx/xxx/xxx/xxx/rbac/target/classes/com/rbac/mapper/SysMenuMapper.class]: com.baomidou.mybatisplus.core.injector.AbstractMethod: method 'void <init>()' not found

Comment From: linghengqian

  • Duplicate with https://github.com/baomidou/mybatis-plus/pull/4870, you need to manually specify the version of org.mybatis.spring.boot:mybatis-spring-boot-starter to 3.0.0 or 3.0.1.

  • This issue should be closed and marked as invalid. This is necessary unless Mybatis Plus decides to drop support for JDK < 17.

Comment From: sukai-cheng

https://github.com/sukai-cheng/generic-programing/tree/master/rbac @linghengqian

Comment From: linghengqian

@sukai-cheng I can't see your error at https://github.com/linghengqian/generic-programing/commit/180c09681e9126ac1e323e2690ff211b088aa4e1. I only see that you have not initialized the testcontainers, so the Postgresql server cannot be found.

Comment From: sukai-cheng

referenced by https://blog.csdn.net/weixin_43170297/article/details/107657823