在mybatis-config核心配置文件中注册了xml以后出现了新的异常错误

Caused by: java.io.IOException: Could not find resource cn.dzp.dao.UserMapper.xml



经过检查发现了我所用的项目乃是maven构建的

maven由于它的约定大于配置,可能会导致我写的配置文件无法被导出或者生效的问题,解决方法就是在pom.xml里面添加以下代码

<build>
<resources>
<resource>
<directory>src/main/resources/</directory>
<includes>
<include>**/*.properties</include>
<include>**/*.xml</include>
</includes>
<filtering>true</filtering>
</resource>
<resource>
<directory>src/main/java</directory>
<includes>
<include>**/*.properties</include>
<include>**/*.xml</include>
</includes>
<filtering>true</filtering>
</resource> </resources>
</build>

这下子运行正常,成功解救问题

最新文章

  1. LintCode Edit Distance
  2. 线程优先级抢占实验【RT-Thread学习笔记 3】
  3. 删除已经配置的类库和移除CocoaPods[转]
  4. Shell脚本的追踪与debug
  5. asp.net下ajax.ajaxMethod使用方法(转)
  6. Unity3d 一些 常见路径
  7. sqlserver 2008 R2 分区表测试
  8. A题笔记(3)
  9. 使用JavaScript扫描端口
  10. Sql server 事务 存储过程
  11. (Jquery)避免数据相加小数点后产生多位数和计算精度损失
  12. devexpress设置系统全局字体(含工具栏字体)
  13. Pollard-rho算法学习笔记
  14. oracle学习笔记第三天
  15. apt-get update 出现错误“ AppStream cache update completed, but some metadata was ignored due to errors. ”
  16. 不得不补:PHP的JSON, SQL
  17. 用git,clone依赖的库
  18. Nordic Collegiate Programming Contest NCPC 2017-Problem D-Distinctive Character
  19. 如何获取select选中的值
  20. linux nat style

热门文章

  1. PowerBI 使用Bookmark
  2. python 闭包函数与装饰器
  3. 03- HTML基本结构
  4. POJ 2762 单连通图
  5. hdu4515 小模拟
  6. Windows中的工作组和域
  7. POJ2431贪心(最少加油次数)
  8. 7.PHP Cookie与Session
  9. HackingLab脚本关
  10. (3) arm 指令