IllegalArgumentException: Could not resolve resource location pattern [classpath .xml]: class path resource cannot be resolved to URL because it does not exist

时间:2021-07-16 20:28:35

查看编译后的classes文件后,没有mapper.xml文件,所以SQLsessionfactory不能读取成功。

在Maven中加入如下的resources配置:

<dependencies>
//相关的依赖包
</dependencies>
.....
<resources>
<resource>
<directory>src/main/resources</directory>
<includes>
<include>**/*.properties</include>
<include>**/*.xml</include>
<include>**/*.tld</include>
</includes>
<filtering>false</filtering>
</resource>
<resource>
<directory>src/main/java</directory>
<includes>
<include>**/*.properties</include>
<include>**/*.xml</include>
<include>**/*.tld</include>
</includes>
<filtering>false</filtering>
</resource>
</resources>

IllegalArgumentException: Could not resolve resource location pattern [classpath .xml]: class path resource cannot be resolved to URL because it does not exist的更多相关文章

  1. 解决 java Could not resolve resource location pattern &lbrack;classpath&colon;sql&sol;&ast;&period;xml&rsqb; 的问题

    时间过的真快,转眼间已经有2年了.2年里发生了太多的事,有些事依稀还记得,但更多的已经忘记.忘记了那些烦恼与忧愁,以为自己会快乐,才发现一切并不是以自己的意志为转移.终于在迷途中迷失了自己, 再也回不 ...

  2. Could not resolve resource location pattern &lbrack;classpath&colon;com&sol;&ast;&ast;&ast;&ast;&sol;mappers&sol;&ast;&period;xml&rsqb;&colon; class path resource &lbrack;com&sol;&ast;&ast;&ast;&ast;&sol;mappers&sol;&rsqb; cannot be resolved to URL because it does not exist的问题

    这里建议先去看看路径的问题,看看application.xml的里面的导入的相应的配置文件的路径有没有问题,如下: 再者看看相应的注解有没有加上,service和controller等的注解 如果再不 ...

  3. Caused by&colon; java&period;io&period;FileNotFoundException&colon; class path resource &lbrack;com&sol;cxy&sol;springboot&sol;mapping&sol;&rsqb; cannot be resolved to URL because it does not exist

    java.lang.IllegalStateException: Failed to load ApplicationContext at org.springframework.test.conte ...

  4. maven项目启动报错;class path resource &lbrack;com&sol;ssm&sol;mapping&sol;&rsqb; cannot be resolved to URL because it does not exist

    项目启动报了一堆错误,其实都是class path resource [com/ssm/mapping/] cannot be resolved to URL because it does not ...

  5. Maven项目启动失败:class path resource &lbrack;spring&sol;&rsqb; cannot be resolved to URL because it does not exist

    目录 Maven项目启动失败:class path resource [spring/] cannot be resolved to URL because it does not exist 解决方 ...

  6. spring 编译时抱错纪录class path resource &lbrack;spring&sol;&rsqb; cannot be resolved to URL because it does not exist

    class path resource [spring/] cannot be resolved to URL because it does not exist; 在 pom.xml 里添加如下代码 ...

  7. class path resource &lbrack;processes&sol;&rsqb; cannot be resolved to URL because it does not exist

    springboot整合activiti时报以下错误,原因是项目启动时检查流程文件 nested exception is java.io.FileNotFoundException: class p ...

  8. SpringBoot打jar包-下载文件时报错-class path resource xxxxxx cannot be resolved to URL because it does not exist

    一.问题由来 新项目的开发中,打包方式由war包改为了jar包的方式,这样在部署的时候更加的方便.测试环境使用pm2这个工具来管理项目的运行,停止,重启等等非常方便. 可是当测试人员在测试项目中的文件 ...

  9. class path resource &lbrack;logback&period;xml&rsqb; cannot be resolved to URL because it does not exist 问题解决

    今天在自己搭建Springboot 框架的时候,在配置 logging.config=classpath:logback.xml 出现找不到这个文件的错误 经发现是maven的一个写法问题,本来我是打 ...

随机推荐

  1. mongodb用子文档做为查询条件的两种方法

    { "_id": ObjectId("52fc6617e97feebe05000000"), "age": 28, "level& ...

  2. 第一种SUSE Linux IP设置方法

    第一种SUSE Linux IP设置方法ifconfig eth0 192.168.1.22 netmask 255.255.255.0 uproute add default gw 192.168. ...

  3. viewpage listview gridview加载本地大图多图OOM处理办法

    很少上博客园写东西了. 最近在写公司项目,由于需要加载本地相册通过viewpager方式来加载, 最后发现直接进入界面就OOM了. 经过几天的整理最终搞定. 现在将加载本地和加载网络图片的缓存工具类贴 ...

  4. GC之七--gc日志分析工具

    性能测试排查定位问题,分析调优过程中,会遇到要分析gc日志,人肉分析gc日志有时比较困难,相关图形化或命令行工具可以有效地帮助辅助分析. Gc日志参数 通过在tomcat启动脚本中添加相关参数生成gc ...

  5. 2、第2节课html教程客户端控件&sol;css第一课&sol;20150917

    1.<form> 标签 提交 <form action="http://www.baidu.com" method="post'> </fo ...

  6. 如何在sublime安装ctags函数追踪插件

    一.这个插件是需要下载执行软件才能够操作的,下载地址http://prdownloads.sourceforge.net/ctags/ctags58.zip 然后解压到自己喜欢的目录下,我是安装到 D ...

  7. Css之 间距初始化

    粗暴初始化: * {margin:0;padding:0;border:0px none;} 优化初始化: /*css reset code */ /**** 文字大小初始化,使1em=10px ** ...

  8. 数据结构【查找】—B树

    /*********************讲解后期补充*****************/ 先上代码 #include "000库函数.h" #define MAXSIZE 10 ...

  9. 【转】AlphaGO Zero 原理

      原文地址:https://www.hhyz.me/2018/08/08/2018-08-08-AlphaGO-Zero/> 1. 概述 简单来说,AlphaGo Zero 的训练可以分为三个 ...

  10. where are you from

    where are you from 如果问美国人这句话的话,他们一般会说: I'm from California. I'm from Pennsylvanian. 一般是说州,而不是说Americ ...