ssm项目扫描不到mapper包,自己总结的方法,请大家多多指教
**org.springframework.web.util.NestedServletException: Request processing failed; nested exception is org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.itheima.mapper.AccountMapper.save**
<!--只需要加上以下的注解,问题方可解决-->
<resources>
<resource>
<directory>src/main/java</directory>
<includes>
<include>**/*.properties</include>
<include>**/*.xml</include>
</includes>
<filtering>false</filtering>
</resource>
</resources>
这篇博客主要介绍了在SSM(Spring、SpringMVC、MyBatis)项目中遇到Mapper包无法被扫描到的问题及解决方案。博主通过在资源配置文件中添加特定的资源扫描配置,成功解决了这个问题。具体解决方法是在`<resources>`标签内增加对`src/main/java`目录下`.properties`和`.xml`文件的扫描,从而确保Mapper接口被正确加载。
1429

被折叠的 条评论
为什么被折叠?



