需要在pom中加入以下代码

<build>
<resources>
<resource>
<directory>src/main/resources</directory>
<includes>
<include>**/*.properties</include>
<include>**/*.xml</include>
</includes>
<filtering>true</filtering>
</resource>
<resource>
<directory>src/main/java</directory>
<includes>
<include>**/*.properties</include>
<include>**/*.xml</include>
</includes>
<filtering>true</filtering>
</resource>
</resources>
</build>

Maven 配置问题 - could not find resource mybatis-config.xml的更多相关文章

  1. Mybatis config.xml 配置

    <!-- xml标准格式 --><?xml version="1.0" encoding="UTF-8"?>  <!DOCTYPE ...

  2. Maven Could not open ServletContext resource [/WEB-INF/applicationContext.xml]

    因此:maven中,配置文件的读取应有下列红字两部分,缺一不可. 不是maven项目时,可以都不写........ <context-param> <param-name>co ...

  3. Maven 搭建 SSM框架——Spring+SpringMVC+Mybatis的搭建教程

    一:概述 SSM框架在项目开发中经常使用到,相比于SSH框架,它在仅几年的开发中运用的更加广泛. Spring作为一个轻量级的框架,有很多的拓展功能,最主要的我们一般项目使用的就是IOC和AOP.Sp ...

  4. MyBatis(2):config.xml文件

    前言 前一篇文章,讲了MyBatis入门,讲到了MyBatis有两个基本的配置文件,一个用来配置环境信息,一个用来写SQL语句.前者我把它命名为config.xml,config.xml的内容是: 1 ...

  5. MyBatis笔记----报错:Error creating bean with name 'sqlSessionFactory' defined in class path resource [com/ij34/mybatis/applicationContext.xml]: Invocation of init method failed; nested exception is org.sp

    四月 05, 2017 4:51:02 下午 org.springframework.context.support.ClassPathXmlApplicationContext prepareRef ...

  6. MyBatis笔记----(2017年)最新的报错:Cannot find class [org.apache.commons.dbcp.BasicDataSource] for bean with name 'dataSource' defined in class path resource [com/ij34/mybatis/applicationContext.xml]; nested e

    四月 05, 2017 4:56:11 下午 org.springframework.context.support.ClassPathXmlApplicationContext prepareRef ...

  7. 如果拷贝项目出现各种找不到文件的时候,基本就是没有标记,或者文件名的问题,Could not find resource mybatis.xml,解决方法

    Could not find resource mybatis.xml

  8. eclipse搭建maven project的spring4 spring mvc mybatis

    一,先确定已经安装好了Eclipse Java EE IDE for Web Developers我用的是如下版本 Version: Neon.3 Release (4.6.3)Build id: 2 ...

  9. Unexpected exception parsing XML document from ServletContext resource [/WEB-INF/config/springdemo-config.xml]

    org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML doc ...

随机推荐

  1. [转帖]Cookie与Passport安全

    Cookie与Passport安全 https://www.cnblogs.com/xinzhao/p/6395153.html 感觉自己对网络安全性的理解还是不深入 不透彻. 对于web系统而言,由 ...

  2. Spring实例化Bean三种方法:构造器、静态工厂、实例工厂

    Spring中Bean相当于java中的类,可以通过xml文件对bean进行配置和管理. 一.Bean的实例化: 构造器实例化.静态工厂实例化.实例工厂方式实例化. 目录: 构造器实例化: xml配置 ...

  3. 二维状压DP经典题

    炮兵阵地 题目链接 题目大意:在n*m的地图上放置炮兵,每个炮兵的攻击范围是上下左右两格内,有两种不同的地形,山地(用"H" 表示),平原(用"P"表示),只有 ...

  4. python — 函数基础知识(一)

    目录 1 面向过程编程与函数式编程 2 函数的基本结构 3 函数的参数 1 面向过程编程与函数式编程 截至目前我们所接触.所写的编程为:面向过程式编程[可读性差/可重用性差] # 面向过程编程 use ...

  5. PB做的托盘程序(最小化后在左下角显示图标)

    见‘文件’资源

  6. k8s-traefik默认80端口

    vim traefik.yaml kind: Deployment apiVersion: extensions/v1beta1 metadata: name: traefik-ingress-con ...

  7. Class.getResources()和classLoader.getResources()区别

    Class.getResource(String path) path不以’/'开头时,默认是从此类所在的包下取资源: path 以’/'开头时,则是从ClassPath根下获取: package t ...

  8. connect() failed (111: Connection refused) while connecting to upstream的解决

    遇到这种情况, 首先 1.检查php-fpm是否启动---------如果没启动->启动, 2.用命令 netstat -ant | grep 9000 查看php-fpm进程,如果没启动-&g ...

  9. linux 打包与解压命令--常用

    一般情况用这俩个就足以了 压缩 tar -czf jpg.tar.gz *.jpg   //将目录里所有jpg文件打包成jpg.tar后,并且将其用gzip压缩,生成一个gzip压缩过的包,命名为jp ...

  10. TP5 用cron实现linux定时任务

    TP5 用cron实现linux定时任务 1) tp5的控制器内容: namespace app\test\controller; use think\Controller; use think\fa ...