项目启动报了一堆错误,其实都是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的更多相关文章

  1. eclipse 中导入 maven项目 启动报错

    导入Maven项目到Eclipse中时,出现问题如下: java.lang.ClassNotFoundException: org.springframework.web.context.Contex ...

  2. 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 解决方 ...

  3. maven项目启动报错:SLF4J: Class path contains multiple SLF4J bindings.

    SringBoot的Application启动报错: SLF4J: Class path contains multiple SLF4J bindings. SLF4J: Found binding ...

  4. Maven项目启动报错

    错误信息如下: 六月 , :: 下午 org.apache.tomcat.util.digester.SetPropertiesRule begin 警告: [SetPropertiesRule]{S ...

  5. 启动Maven项目启动报错:java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener

    tomcat在发布项目的时候没有同时发布maven依赖所添加的jar包,你需要设置一下eclipse:项目 -> 属性 -> Deployment Assembly -> Add - ...

  6. maven项目 启动报错:java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener

    tomcat在发布项目的时候没有同时发布maven依赖所添加的jar包,所以找不到解决方法:设置一下eclipse:项目 -> properties -> Deployment Assem ...

  7. Maven项目启动报错:org.springframework.web.filter.CharacterEncodingFilter cannot be cast to javax.servlet.Filter

    看网上说法tomcat启动时会把lib目录下的jar包加载进内存,而项目里也有相同的jar包就会导致jar包冲突 解决办法: 把pom依赖里相应的jar包添加<scope>标签 <d ...

  8. Maven项目启动报错:java.lang.ClassNotFoundException: com.mysql.jdbc.Driver

    1.场景 1.1.先确认pom.xml文件已添加mysql依赖: <dependency>    <groupId>mysql</groupId>     < ...

  9. eclipse中Maven项目启动报错“3 字节的 UTF-8 序列的字节 3 无效。”

    发生原因不知道. 解决方法是在pom.xml中追加 <properties> <project.build.sourceEncoding>UTF-8</project.b ...

随机推荐

  1. entry.define编程思路

    0.lua将文字传给场景脚本. 1.场景脚本将pattern.define文件中的PAT当作子弹(水泡弹,带颜色) 2.用户的问题作为客户端的请求,发送给服务器端 3.服务器端接受客户端的问题请求 4 ...

  2. DAX/PowerBI系列 - 参数表(Parameter Table) - 大客户分析(Top N)

    DAX/PowerBI系列 - 参数表(Parameter Table) - 大客户分析(Top N) 难度: ★☆☆☆☆(1星) 适用范围: ★★★☆☆(3星) 概况:此文为DAX/PowerBI系 ...

  3. centos7安装Lua

    网官有介绍安装:http://www.lua.org/start.html 由于之前我遇到过致命错误并纪录在:https://blog.csdn.net/bingbingtea/article/det ...

  4. 【LeetCode每天一题】Container With Most Water(容器中最多的水)

    Given n non-negative integers a1, a2, ..., an , where each represents a point at coordinate (i, ai). ...

  5. Dotfuscator代码混淆工具的使用

    关于Dotfuscator,VS自带了一个社区版的源代码保护工具,不过它只有基本的混淆命名的功能.专业版功能很多,可以混淆流程,密字符串,加入水印,程序签名等. 工具/原料   Dotfuscator ...

  6. Boost学习-Linuxidc上的很好的学习资料

    来自 http://www.linuxidc.com/Linux/2011-07/39215.htm,拷贝第一页如下 Boost学习系列 简介及基本用法 [日期:2011-07-25] 来源:Linu ...

  7. Git操作说明

    Git操作说明 1.将本地项目上传到GitHub 1)    首先在GitHub上注册帐户 2)    在GitHub上创建仓库 3)    Pc安装Git客户端(Git Bach) 4)    打开 ...

  8. node.js初识10

    post请求 form.html <!DOCTYPE html> <html lang="en"> <head> <meta charse ...

  9. UVALi 3263 That Nice Euler Circuit(几何)

    That Nice Euler Circuit [题目链接]That Nice Euler Circuit [题目类型]几何 &题解: 蓝书P260 要用欧拉定理:V+F=E+2 V是顶点数; ...

  10. HashMap(JDK1.8)

      四个构造函数: 构造方法只是赋值属性初始值但是不会真正初始化数组表空间,在第一次添加元素时形成数组表空间.这个和以往的jDK1.7之前的不同,1.7之前的都是在构造里初始化了table数组空间. ...