一、Maven项目配置结束后提示Mapper.xml找不到

java.lang.ExceptionInInitializerError

……
Caused by: org.apache.ibatis.exceptions.PersistenceException:
Error building SqlSession.

The error may exist in com/leshangju/dao/UserMapper.xml

Cause: org.apache.ibatis.builder.BuilderException: Error parsing SQL Mapper Configuration. Cause: java.io.IOException: Could not find resource com/leshangju/dao/UserMapper.xml

at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:30)
at org.apache.ibatis.session.SqlSessionFactoryBuilder.build(SqlSessionFactoryBuilder.java:80)
at org.apache.ibatis.session.SqlSessionFactoryBuilder.build(SqlSessionFactoryBuilder.java:64)
at com.leshangju.utils.MybatisUtils.<clinit>(MybatisUtils.java:18)
... 25 more

Caused by: org.apache.ibatis.builder.BuilderException: Error parsing SQL Mapper Configuration. Cause: java.io.IOException: Could not find resource com/leshangju/dao/UserMapper.xml

at org.apache.ibatis.builder.xml.XMLConfigBuilder.parseConfiguration(XMLConfigBuilder.java:121)
at org.apache.ibatis.builder.xml.XMLConfigBuilder.parse(XMLConfigBuilder.java:98)
at org.apache.ibatis.session.SqlSessionFactoryBuilder.build(SqlSessionFactoryBuilder.java:78)
... 27 more

Caused by: java.io.IOException: Could not find resource com/leshangju/dao/UserMapper.xml

at org.apache.ibatis.io.Resources.getResourceAsStream(Resources.java:114)
at org.apache.ibatis.io.Resources.getResourceAsStream(Resources.java:100)
at org.apache.ibatis.builder.xml.XMLConfigBuilder.mapperElement(XMLConfigBuilder.java:372)
at org.apache.ibatis.builder.xml.XMLConfigBuilder.parseConfiguration(XMLConfigBuilder.java:119)
... 29 more`

报错如下

![在这里插入图片描述](https://img-blog.csdnimg.cn/e59b780f68cf43c5b4dfe7cc24f501bc.png?x-oss-process=image/watermark,type_d3F5LXplbmhlaQ,shadow_50,text_Q1NETiBA5bCP6I-c6bif55qE5pil5aSp,size_20,color_FFFFFF,t_70,g_se,x_16)

  • 问题原因:Maven静态资源导出失败(未生效,所以在tagart目录下面同文件夹下看不到xml文件)
  • 解决办法:在pom文件中加上以下语句
<!--    Maven静态资源导出--><build><resources><resource><directory>src/main/java</directory><includes><include>**/*.properties</include><include>**/*.xml</include></includes><filtering>false</filtering></resource><resource><directory>src/main/resources</directory><includes><include>**/*.properties</include><include>**/*.xml</include></includes><filtering>false</filtering></resource></resources></build>

MyBatis 报错The error may exist in…….xml相关推荐

  1. Mybatis报错:Could not find resource mybatis-conf.xml

    Mybatis报错:Could not find resource mybatis-conf.xml 报错截图: 报错内容: java.io.IOException: Could not find r ...

  2. mybatis报错### The error may involve defaultParameterMap ### The error occurred while setting paramete

    前两天写的一个springboot+mybatis的小项目在一个修改数据库数据的功能出现了 ###The error may involve defaultParameterMap ###The er ...

  3. Mybatis 报错 The error may involve cn.changemax.dao.FilmInfoDAO.batchUpdate-Inline

    一.错误主题: 2020-02-07 22:37:43.596 ERROR 12612 --- [   scheduling-1] o.s.s.s.TaskUtils$LoggingErrorHand ...

  4. Loadrunner 报错: Error: The table 'E:\*性能测试脚本\login1\userName.dat' does not exist.

    Loadrunner 报错: Error: The table 'E:\*性能测试脚本\login1\userName.dat' does not exist.  loadrunner编译时报错,路径 ...

  5. Mysql报错Fatal error:Can't open and lock privilege tables

     Mysql报错Fatal error: Can't open and lock privilege tables: Table 'mysql.host' doesn't exist 安装mysql后 ...

  6. Mybatis报错:Could not resolve type alias

    一.问题描述 打包项目成jar包,启动莫名其妙的mybatis报错如下: org.springframework.core.NestedIOException: Failed to parse map ...

  7. 报错:Error querying database. Cause: java.sql.SQLException: Access denied for user ‘root‘@‘localhost‘

    报错:Error querying database. Cause: java.sql.SQLException: Access denied for user 'root'@'localhost' ...

  8. mybatis报错Unsatisfied dependency expressed through field ‘baseMapper‘解决方案

    mybatis报错Unsatisfied dependency expressed through field 'baseMapper'解决方案 问题背景 解决方案一 解决方案二 Lyric: 管他管 ...

  9. mybatis 报错There is no getter for property named 'XXX' in 'class com.xx.xx'

    mybatis报错信息记录: ### Error querying database.  Cause: org.apache.ibatis.reflection.ReflectionException ...

  10. 使用moveit_setup_assistant生成配置包之后,在功能包内打开终端运行roslaunch demo.launch,报错 RLException: error loading <rosp

    使用moveit_setup_assistant生成配置包之后,在功能包内打开终端运行roslaunch demo.launch,报错 RLException: error loading tag: ...

最新文章

  1. Linux与云计算——第二阶段 第五章:存储Storage服务器架设—分布式存储GlusterFS基础...
  2. C语言 泛型链表 如何计算(结构体中各元素)相对内存地址?(字节对齐,结构体对齐)offsetof()函数 ( (struct X*)0 ) -> Y)语法(匿名结构体)
  3. Java IO流学习总结二:File
  4. WebApi接口 - 响应输出xml和json 转
  5. 当当购书双十一钜惠,5折封顶!附图灵人工智能书单
  6. 电动汽车告急?特斯拉、蔚来之后 一辆比亚迪新能源车突然自燃...
  7. 解决VS2019中.net core WPF 暂时无法使用 Designer 的临时方法
  8. php生成站点地图,php生成百度站点地图sitemap.xml
  9. ajax离开页面方法,jQuery中ajax调用当前页面方法
  10. 一位寒门博士的致谢,女友回复...
  11. 一文读懂「云上企业级存储」
  12. 电梯仿真模拟,电梯模拟运行,电梯仿真运行,基于西门子博图S7-1200plc与触摸屏HMI的电梯模拟仿真控制系统设计
  13. DOCTYPE声明——标准模式与怪异模式的区别
  14. 中国互联网惊呆老外?微信大数据揭露“无现金”真相
  15. Pluck Cms文件上传结合命令执行复现
  16. ARCGIS中坐标转换及地理坐标、投影坐标的定义(转载)
  17. 教师直播平台对比分析
  18. SEO的工作内容是什么?
  19. 数据结构c语言版字符逆转视频,C语言版数据结构2019
  20. 【Android应用开发】-(16)如何绕开Google Play地区限制

热门文章

  1. 台式计算机2017排行分析,台式电脑CPU性能排行 桌面CPU天梯图2017年9月最新版 (全文)...
  2. Unity3D研究院之Inspector面板枚举的别名与排序(八十九)
  3. 输入法突然变成繁体字的解决方法
  4. 基于HTML5之APP购物车实现
  5. Flash:任意变形工具的使用
  6. lol全队消息怎么发_英雄联盟如何发全部消息,LOL怎样发送消息给全部
  7. AUTOCAD--实时缩放
  8. java新手怎么用if alse_关于java:为什么“F”+“alse”不是==“False”?
  9. 怎么对比两个excel文档的数据差异
  10. c语言识别希腊字母吗,isalpha()