1.web.xml

    <!-- 加载spring容器 -->
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath*:spring-config.xml</param-value>
</context-param>

2.spring-config.xml

 <import resource="spring/applicationContext-dao.xml" />

3.applicationContext-dao.xml

    <!-- 配置mybatisSqlSessionFactoryBean -->
<bean id="factory" class="org.mybatis.spring.SqlSessionFactoryBean">
<property name="dataSource" ref="dataSource" />
<property name="mapperLocations" value="classpath:com/jd/m/cms/bjshare/dao/sqlmap/*.xml"/>
<property name="configLocation" value="classpath:mybatis/SqlMapConfig.xml"/>
</bean>

4.如果spring-config.xml和applicationContext-*.xml保存在一个文件夹下,那么mybatis配置文件*.xml就不能保存在根目录下,否则启动找不到

如果spring-config.xml和applicationContext-*.xml不保存在一个文件夹下,那么mybatis配置文件*.xml就可以保存在根目录下,系统正常启动

配置文件和mybatis文件存放位置导致系统启动不了的更多相关文章

  1. yum安装Apache Web Server后各个文件存放位置

    yum安装Apache Web Server后各个文件存放位置   用yum安装apache软件: yum -y install httpd 安装完成后,来查看理解yum安装软件的过程和安装路径.   ...

  2. SqlServer修改数据库文件及日志文件存放位置

    --查看当前的存放位置 select database_id,name,physical_name AS CurrentLocation,state_desc,size from sys.master ...

  3. 怎样查看MySql数据库物理文件存放位置

    想导出mysql中的数据库文件,死活找不到,网上说在配置文件中有路径,可是我打开我的配置文件,里边的代码全都是注释掉的,没有一句有用的.后来在某一论坛上找到解决方法了,记录下来. 使用如下命令: my ...

  4. 如何查看和更改mysql数据库文件存放位置

    mysql数据库的数据文件默认是存放在:C:\Documents and Settings\All Users\Application Data\MySQL\MySQL Server 5.1\data ...

  5. hadoop 集群及hbase集群的pid文件存放位置

    一.当hbase集群和hadoop集群停了做一些配置调整,结果执行stop-all.sh的时候无法停止集群, 提示no datanode,no namenode等等之类的信息, 查看stop-all. ...

  6. Linux下MySQL的数据文件存放位置

    http://bbs.csdn.net/topics/390620630mysql> show variables like '%dir%';+------------------------- ...

  7. Android提供的layout文件存放位置

    在编程的过程中,会用到android.R.layout下的一些常量.与这些常量对应的,Android提供了对应点的layout布局文件. android.jar中有对应的xml文件,但是打开的时候通常 ...

  8. Postgresql迁移数据文件存放位置

    1. POSTGRESQL的安装 centos7 里面默认的pgsql的版本是 如果想用更高的版本需要执行以下如下的命令 rpm -ivh https://download.postgresql.or ...

  9. maven setting.xml 存放位置导致deply失败,显示没有权限401错误

    settings.xml存在于两个地方: 1.安装的地方:$M2_HOME/conf/settings.xml 2.用户的目录:${user.home}/.m2/settings.xml 我只在mav ...

随机推荐

  1. tsung

    要做针对mongodb的压力测试,下了个tsung,看看他的策略是什么,目前定位ts_launcher.erl:do_launch({Intensity, MyHostName, PhaseId})- ...

  2. 中南oj 1216: 异或最大值 数据结构

    1216: 异或最大值 Time Limit: 2 Sec  Memory Limit: 128 MB Submit: 98  Solved: 29 [Submit][Status][Web Boar ...

  3. lintcode 刷题记录··

    单例模式,用C#实现过单例模式,python区别就是类里边的静态方法写法不一样,python叫类方法,函数之前加@classmethod class Solution: # @return: The ...

  4. 【Python之搜索引擎】(一)概述

    learning goal--search engine 1.Find datas - crawl 2.Index 3.page rank String操作 提取网络中的链接 Extracting a ...

  5. xlwings: Write Excel macro using python instead of VBA

    i want to write Excel macros to deal with the data, but i am not familiar with VBA language. so i de ...

  6. gitattributes中的filter

    .gitattributes文件就是一个简单的text文本文件,它的作用是gives attributes to pathnames. 该文件中的一些配置可以为某些特定目录或者文件来设置,这样Git就 ...

  7. 【Leetcode】【Medium】Swap Nodes in Pairs

    Given a linked list, swap every two adjacent nodes and return its head. For example,Given 1->2-&g ...

  8. Bash命令行 bash &> >& Bash One-Liners Explained

    Bash One-Liners Explained, Part I: Working with files https://catonmat.net/bash-one-liners-explained ...

  9. linux开机启动脚本

    linux开机启动脚本 linux 开机启动脚本 用户自定义开机程序(/etc/rc.d/rc.local) 操作最简单,方便.每次都自己启动PHP啊,Nginx啊 烦死了,其他方式还要弄shell啊 ...

  10. 高CPU业务

    高CPU业务 Gearman是当年LiveJournal用来做图片resize的,大家也明白图片resize是一个高CPU的操作,如果让web网站去做这个高CPU的功能,有可能会拖垮你的 web应用, ...