关于 “org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)” 错误的问题。

springboot整合mybatis,出现 “org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)” 错误原因:

1、dao层mapper接口有没有@Mapper注解,或者启动类有没有@MapperScan()注解,Spring无法进行管理。两个注解选择一种方式使用即可


2、Spring没有读取到mapper配置文件,application.properties中是否进行了配置


2、整合mybatis无mapper文件的方案,Mapper接口中,各个方法要添加sql注解

猜你喜欢

转载自blog.csdn.net/weixin_42315600/article/details/84581453
今日推荐