解决Error parsing SQL Mapper Configuration. Cause: java.io.IOException: Could not find resource com/cqupt/paging/dao/User.xml
搭建了一个ssm项目,启动报错Error parsing SQL Mapper Configuration. Cause: java.io.IOException: Could not find resource com/cqupt/paging/dao/User.xml
我看了一下路径没错,名字也没有写错
网上找了一下资料解决了,记录一下
我用maven管理,在target下并没有将User.xml,出错原因就是maven编译时没有将xml文件放进去,所以才会找不到User.xml文件
解决方法,在pom.xml加入:
<!--classpath-->
<build>
<!-- 定义classpath -->
<resources>
<!-- resources文件 -->
<resource>
<directory>src/main/resources</directory>
<!-- 是否被过滤,如果被过滤则无法使用 -->
<filtering>false</filtering>
</resource>
<!-- java文件夹 -->
<resource>
<directory>src/main/java</directory>
<!-- 引入映射文件等 -->
<includes>
<include>**/*.xml</include>
<include>**/*.properties</include>
</includes>
</resource>
</resources>
</build>
或者手动将User.xml放入targegt对应的路径下
解决Error parsing SQL Mapper Configuration. Cause: java.io.IOException: Could not find resource com/cqupt/paging/dao/User.xml的更多相关文章
- idea 下 启动maven项目,mybatis报错 Error parsing SQL Mapper Configuration. Cause: java.io.IOException。。。。。
我的具体报错日志是 Error parsing SQL Mapper Configuration. Cause: java.io.IOException Could not find resou ...
- ### Error building SqlSession. ### The error may exist in SQL Mapper Configuration ### Cause: org.apache.ibatis.builder.BuilderException: Error parsing SQL Mapper Configuration. Cause: org.apache.ibat
这是一个由粗心导致的错误,具体报错如下: org.apache.ibatis.exceptions.PersistenceException: ### Error building SqlSessio ...
- ### Cause: org.apache.ibatis.builder.BuilderException: Error parsing SQL Mapper Configuration. Cause: org.apache.ibatis.builder.BuilderException: Error creating document instance. Cause: org.xml.sax.
在做多表映射查询时,在同一个resultMap中写了1:1映射和1:n映射,结果测试时报错如下: org.apache.ibatis.exceptions.PersistenceException: ...
- Error building SqlSession. ### The error may exist in dao/UserMapper.xml ### Cause: org.apache.ibatis.builder.BuilderException: Error parsing SQL Mapper Configuration(2 字节的 UTF-8 序列的字节 2 无效。)
关于在学习Mybatis框架时运行报错 Caused by: org.apache.ibatis.exceptions.PersistenceException: ### Error building ...
- The error may exist in com/bjpowernode/dao/StudentDao.xml ### Cause: org.apache.ibatis.builder.BuilderException: Error parsing SQL Mapper Configuration. Cause: org.apache.ibatis.builder.BuilderExcept
The error may exist in com/bjpowernode/dao/StudentDao.xml### Cause: org.apache.ibatis.builder.Builde ...
- mybatis错误——java.io.IOException: Could not find resource com/xxx/xxxMapper.xml
在学习Mybatis的时候,参考网上的教程进行简单demo的搭建,配置的没有问题,然后出现了下面的错误! Exception in thread "main" java.lang. ...
- java.io.IOException: Could not find resource com/xxx/xxxMapper.xml
java.io.IOException: Could not find resource com/xxx/xxxMapper.xml 报错内容: org.apache.ibatis.exception ...
- java.io.IOException: Could not find resource SqlMapConfig.xml
java.io.IOException: Could not find resource SqlMapConfig.xml 创建mybatis工程时遇到的问题 问题的来源:当我们在项目中和src同级的 ...
- IDEA工具java.io.IOException: Could not find resource SqlMapConfig.xml
IDEA工具java.io.IOException: Could not find resource SqlMapConfig.xml 解决办法: 1.删掉pom.xml文件的这行代码 <pac ...
随机推荐
- 网站app被劫持怎么办?HTTPDNS阿里云域名防劫持, DNSPod 移动解析服务 D+
网站app被劫持怎么办?HTTPDNS阿里云域名防劫持, DNSPod 移动解析服务 D+ HTTPDNS_移动开发_域名解析_域名防劫持-阿里云https://www.aliyun.com/prod ...
- Vue 组件&组件之间的通信 之全局组件与局部组件
在上篇博客中介绍了组件,在注册组件的简写中就用到了全局组件 //注册组件的简写方式 Vue.component('my-componenta',{ template:'<h2>hello ...
- go 编译:交叉编译&编译执行过程
1. 交叉编译 编译Windows程序和mac程序 GOOS=windows GOARCH-amd64 go build main.go 转自:https://www.cnblogs.com/mafe ...
- ORA-12801/ORA-12853: insufficient memory for PX buffers: current 274880K, max needed 19722240K/ORA-04031解决方法
近日,现场一台服务器在运行时出现下列异常: ORA-12801: error signaled in parallel query server P139 ORA-12853: insufficien ...
- ant__property标签的含义与使用
property标记用于设置属性 属性是键值对,其中每个值都与键相关联,属性用于设置可在构建文件中的任务位置访问的值,设置属性后无法更改 Apache Ant属性类型有两种:内置属性 / 用户定义的属 ...
- 160CrackMe第十九Brad Soblesky.2
查壳无壳,vc写的. 我们输入假码后,然后点击,弹出错误框,直接打开od,对MessageBoxA下断点也行,寻找字符串也行. 一般的错误提示部分代码类似于这样. call xxx test xxx, ...
- 基于 arduino 的低功耗无线传感结点设计
发送端 仿真图: *仿真图中使用使用TMP传感器(LM34)代替实际使用的DHT11传感器. 连接方式: DHT11的正极(VCC)与5V电源接口连接 DHT11的负极(GND)与GND连接 DHT1 ...
- Docker应用
1.tomcat容器创建 docker run -d --name Jdd_tomcat -p 8081:8080 tomcat [root@localhost etc]# docker run - ...
- http随笔
1.什么是http? HTTP协议是Hyper Text Transfer Protocol(超文本传输协议)的缩写,是用于从WWW服务器传输超文本到本地浏览器的传送协议.它可以使浏览器更加高效,使网 ...
- 缺陷管理工具Jira安装参考
1安装简介 1.1方案/流程简介 需要依赖安装数据库,可以是mysql,orace或sqlserver.以mysql为例说明. 各模块各阶段安装任务说明如下: 安装模块 说明 jira 项目与事务 ...