springboot+mp异常
Published on Oct 11, 2024, with 24 view(s) and 0 comment(s)
Ai 摘要:本文指出Spring Boot 3.3.4与MyBatis-Plus的版本兼容性问题,强调应使用专为Spring Boot 3设计的`mybatis-plus-spring-boot3-starter`依赖(版本3.5.8),而非通用的`mybatis-plus-spring-boot-starter`,以避免因版本不匹配导致的异常。
    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter</artifactId>
      <version>3.3.4</version>
      <scope>compile</scope>
    </dependency>
对应
        <dependency>
            <groupId>com.baomidou</groupId>
            <artifactId>mybatis-plus-spring-boot3-starter</artifactId>
            <version>3.5.8</version>
        </dependency>
而不是
        <dependency>
            <groupId>com.baomidou</groupId>
            <artifactId>mybatis-plus-spring-boot-starter</artifactId>
            <version>3.5.8</version>
        </dependency>

mybatis-plus-spring-boot3-starter