mybatis-plus绑定属性出错解决方案org.apache.ibatis.binding.BindingException:Invalid bound statement(not found)
2020-06-29 04:55
1186 查看
mybatis-plus绑定属性出错解决方法
问题1 配置文件
查看yml配置文件 这里是否扫描到xml配置
配置config这里也需要扫描 注意这里的路径一定要正确
问题2 pom文件
<dependency> <groupId>com.baomidou</groupId> <artifactId>mybatisplus-spring-boot-starter</artifactId> <version>1.0.5</version> </dependency> <dependency> <groupId>com.baomidou</groupId> <artifactId>mybatis-plus</artifactId> <version>2.1.9</version> </dependency>
注意:mybatis-plus-spring-start/或者我上面的这个(第一个)如果你使用的是mybatis-plus(第二个包)这个
配置文件请使用
mybatis-plus: mapper-locations: xxxxx
mybatis-plus-spring-start这种
mybatis: mapper-locations: xxxxx
这里一个用的mybatis 一个mybatis-plus去扫描 如果用我的pom请使用mybatis-plus这个配置
同时这个问题可以解决(本人亲测 --把pom改回来还是报错因为缓存还是pom没下载过来 删了好几次才好)
兼容问题
以上排除配置问题 来个最暴力的解决
<dependency> <groupId>com.baomidou</groupId> <artifactId>mybatis-plus-boot-starter</artifactId> <version>3.0.7</version> </dependency> <dependency> <groupId>com.baomidou</groupId> <artifactId>mybatis-plus</artifactId> <version>3.0.7</version> </dependency> <dependency> <groupId>com.baomidou</groupId> <artifactId>mybatis-plus-generator</artifactId> <version>3.0.7</version> </dependency> <!-- mybatis的分页插件 --> <dependency> <groupId>com.github.pagehelper</groupId> <artifactId>pagehelper-spring-boot-starter</artifactId> <version>1.2.13</version> </dependency>
这样问题就完美解决了 但是前面的扫描配置不要弄错了
有的pom直接项目不能启动的用我这个配置应该可以解决
相关文章推荐
- mybatis绑定错误,org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)
- mybatis绑定错误:org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)
- mybatis绑定错误org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)
- mybatis绑定错误:org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)
- MyBatis不能绑定xml:org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)
- 配置文件出错 org.apache.ibatis.binding.BindingException: Invalid bound statement (not found):
- Maven 遇到mybatis 发生org.apache.ibatis.binding.BindingException: Invalid bound statement (not found):
- mybatis org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)异常解决
- 关于mybatis “org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)” 错误的问题。
- mybatis maven打包出现org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)错误
- mybatis报错,扫描不到mapper,org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)
- 【spring boot Mybatis】报错:org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.newhope.interview.dao.UserMapper.add
- org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)新的异常解决方案
- org.apache.ibatis.binding.BindingException: Invalid bound statement (not found) 解决方案
- mybatis配置时出现org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)
- Mybatis报错:org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)
- 关于mybatis “org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)” 错误的问题
- 关于mybatis的org.apache.ibatis.binding.BindingException: Invalid bound statement (not found):
- org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)异常解决方案
- mybatis错误:org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)