maven项目启动报错;class path resource [com/ssm/mapping/] 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 exist这一个错误引起的
原来的session工厂的配置是这样写的
<bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
<property name="dataSource" ref="dataSource"></property>
<!-- 自动扫描entity目录, 省掉Configuration.xml里的手工配置 -->
<property name="mapperLocations" value="classpath:com/ssm/mapping/*.xml"></property>
</bean>
把classpath后加上*号,所有的问题都解决了,更改后的代码
<bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
<property name="dataSource" ref="dataSource"></property>
<!-- 自动扫描entity目录, 省掉Configuration.xml里的手工配置 -->
<property name="mapperLocations" value="classpath*:com/ssm/mapping/*.xml"></property>
</bean>
maven项目启动报错;class path resource [com/ssm/mapping/] cannot be resolved to URL because it does not exist的更多相关文章
- eclipse 中导入 maven项目 启动报错
导入Maven项目到Eclipse中时,出现问题如下: java.lang.ClassNotFoundException: org.springframework.web.context.Contex ...
- Maven项目启动失败:class path resource [spring/] 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 解决方 ...
- maven项目启动报错:SLF4J: Class path contains multiple SLF4J bindings.
SringBoot的Application启动报错: SLF4J: Class path contains multiple SLF4J bindings. SLF4J: Found binding ...
- Maven项目启动报错
错误信息如下: 六月 , :: 下午 org.apache.tomcat.util.digester.SetPropertiesRule begin 警告: [SetPropertiesRule]{S ...
- 启动Maven项目启动报错:java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener
tomcat在发布项目的时候没有同时发布maven依赖所添加的jar包,你需要设置一下eclipse:项目 -> 属性 -> Deployment Assembly -> Add - ...
- maven项目 启动报错:java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener
tomcat在发布项目的时候没有同时发布maven依赖所添加的jar包,所以找不到解决方法:设置一下eclipse:项目 -> properties -> Deployment Assem ...
- Maven项目启动报错:org.springframework.web.filter.CharacterEncodingFilter cannot be cast to javax.servlet.Filter
看网上说法tomcat启动时会把lib目录下的jar包加载进内存,而项目里也有相同的jar包就会导致jar包冲突 解决办法: 把pom依赖里相应的jar包添加<scope>标签 <d ...
- Maven项目启动报错:java.lang.ClassNotFoundException: com.mysql.jdbc.Driver
1.场景 1.1.先确认pom.xml文件已添加mysql依赖: <dependency> <groupId>mysql</groupId> < ...
- eclipse中Maven项目启动报错“3 字节的 UTF-8 序列的字节 3 无效。”
发生原因不知道. 解决方法是在pom.xml中追加 <properties> <project.build.sourceEncoding>UTF-8</project.b ...
随机推荐
- nginx 启动报错403
nginx 安装完成以后启动的时候报403, 网上找的答案是在配置文件nginx.conf里面加上 user root owner;这个要加在配置文件的第一行才行,否则还是会报错,配置文件截图为: 参 ...
- 安卓端数据导出成txt文件
toExport() { if (this.dataList == false) { this.$createDialog({ type: "alert", content: &q ...
- PHP的类,abstract类,interface及关键字extends和implements
原文:https://blog.csdn.net/qq_19557947/article/details/77880757?locationNum=4&fps=1 PHP类 PHP类是单继承, ...
- linux iscsi挂载与卸载
iscsiadm -m discovery -t sendtargets -p 192.168.4.245:3260 #扫描ISCSI Target 列出所有LUN iscsiadm -m node ...
- 2018-2019-1 20189221《Linux内核原理与分析》第五周作业
2018-2019-1 20189221<Linux内核原理与分析>第五周作业 实验四 实验过程 当用户态进程调用一个系统调用时,cpu切换到内核态并开始执行一个内核函数. 在Linux中 ...
- HTTPS安全不?
首先,它是什么?我的理解是一开始进行SSL握手,商量好将要使用哪些加密算法来通讯,或者加密方法后使用非对称的加密方法,交互一下随机数,加上一个pre-master-secrect的,然后服务端利用私钥 ...
- MSSqlServer 发布/订阅配置(主从同步)
背景: 1.单个独立数据库的吞吐量是有瓶颈的,那么如何解决这个瓶颈? 2.服务器直接数据如何复制.并具备一致性.可扩展性? 资源: 官方资源:https://technet.microsoft.com ...
- Python+Selenium框架设计之框架内封装基类和实现POM
原文地址https://blog.csdn.net/u011541946/article/details/70269965 作者:Anthony_tester 来源:CSDN 博客地址https ...
- cocos2d JS-(JavaScript) 动态生成方法的例子
function User(properties) { for (var i in properties) { (function (which) { var p = i; which["g ...
- python时间和日期
一.time 和 calendar 模块可以用于格式化日期和时间 import time; # 引入time模块 ticks = time.time() print "当前时间戳为:&quo ...