mybatis-plus使用注意事项
1、关于mybatis-plus关于IPage报错
报错关于IPage,先排查依赖是否引入,二排查引入的依赖,正确的依赖为
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-boot-starter</artifactId>
<version>3.4.2</version>
</dependency>
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-generator</artifactId>
<version>3.4.1</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>org.mybatis.spring.boot</groupId>
<artifactId>mybatis-spring-boot-starter</artifactId>
<version>2.1.0</version>
</dependency>
重要的依赖要确认已引入
控制台打印该图案表示mybatis-plus已启动成功
2、 mybatis-plus报错org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)找不到对象中的方法
首先排查对应的beanName与methodName是否一致
二排查扫描的路径是否正确
三如果用了mybatis-plus则需要在配置文件中配置mybatis-plus参数