异常记录 org.apache.ibatis.binding.BindingException
异常:
1 org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): top.nilux.e3mall.search.mapper.ItemInfoMapper.selectAllItemInfo4Solr 2 at org.apache.ibatis.binding.MapperMethod$SqlCommand.<init>(MapperMethod.java:189) 3 at org.apache.ibatis.binding.MapperMethod.<init>(MapperMethod.java:43) 4 at org.apache.ibatis.binding.MapperProxy.cachedMapperMethod(MapperProxy.java:58) 5 at org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:51) 6 at com.sun.proxy.$Proxy34.selectAllItemInfo4Solr(Unknown Source)
分析解决:在pom文件中添加:
<!-- 如果不添加此节点,mybatis的mapper.xml文件都会被漏掉。 -->
<build>
<resources>
<resource>
<directory>src/main/java</directory>
<includes>
<include>**/*.properties</include>
<include>**/*.xml</include>
</includes>
<filtering>false</filtering>
</resource>
</resources>
</build>
浙公网安备 33010602011771号