当前位置: 代码迷 >> 综合 >> Invalid bound statement (not found): com.z.mapper.UsersMapper.selUsers
  详细解决方案

Invalid bound statement (not found): com.z.mapper.UsersMapper.selUsers

热度:81   发布时间:2023-11-23 10:36:38.0

在这里插入图片描述
项目是用maven写的,maven中默认的情况下只对Java文件编译,即除了包和Java代码外其他东西不需要编译,在里添加拷贝插件

<build><!--指定哪些资源要编译 --><resources><resource><directory>src/main/java</directory><includes><include>**/*.xml</include></includes></resource><resource><directory>src/main/resources</directory><includes><include>**/*.xml</include><include>**/*.properties</include></includes></resource></resources> </build> 

但是加了还是没什么用,又在applicationContext.xml文件中找各种细节,发现就是我的mapper配置的ID没对上,applicationContext.xml扫描不到ID,要是直接用注解就不用考虑id的问题了

  相关解决方案