maven创建web工程Spring配置文件找不到
使用maven创建web工程,将Spring配置文件applicationContext.xml放在src/resource下,用eclipse编译时提示class path resource [applicationContext.xml] cannot be opened because it does not exist错误。但是用mvn clean package命令编译时成功的。web.xml配置的如下
contextConfigLocation
classpath:applicationContext.xml
用google搜索一下(之前google用不了,用百度搜到蛋疼),发现是由于classpath不是指向resource路径,导致一直找不到文件。需要在classpath后面加个,这样就解决问题了。
contextConfigLocation
classpath:applicationContext.xml
maven创建web工程Spring配置文件找不到的更多相关文章
- maven创建web工程Spring配置文件找不到问题解决方案
使用maven创建web工程,将Spring配置文件applicationContext.xml放在src/resource下,用eclipse编译时提示class path resource [ap ...
- 初次使用maven创建web工程发现只有一个idea目录,src,webapp目录都不见了,解决方案
修bug系列2之 初次使用maven创建web项目的src目录不知所踪 窗外下着下雨,屋内的我学着maven,本以为轻轻松松,没想到还是遇到了bug.好了不说了,来看看我是怎么解决的. 在初次使用ma ...
- 在Eclipse中使用Maven创建Web工程
在Eclipse中使用Maven创建Web工程 1.创建maven Project工程,使用maven-archetype-webapp 2.在pom.xml文件中,设置打包类型为war <pa ...
- 用maven创建web项目(spring Mvc)
用maven创建web项目(spring Mvc) 1.打开cmd进入到你要创建maven项目的目录下: 2.输入以下命令.然后根据提示输入相应的groupId.artifactId.version: ...
- Maven创建Web工程并执行构建/测试/打包/部署
创建工程基本参考上一篇Java Application工程,不同的是命令参数变了,创建Web工程的命令如下: mvn archetype:generate -DgroupId=com.jsoft.te ...
- maven创建web工程,并导入到eclipse中
maven版本:3.1.0,eclipse版本:4.3 JDK:1.7 创建工程名是sa的maven工程 mvn archetype:create -DgroupId=com.bing-Dartifa ...
- 用maven创建web工程
1.打开eclipse,选择File->New->Other菜单,弹出下面的对话框,在Wizards中输入maven,会过滤出和maven相关的菜单,选中Maven Project菜单,然 ...
- 基于eclipse+maven创建web工程
Eclipse+Maven创建webapp项目<一> 1.开启eclipse,右键new——>other,如下图找到maven project 2.选择maven project,显 ...
- maven 创建web工程,spring配置文件找不到!
公司项目用的maven,在启动服务器的时候,出现上面的错误,然后找到WEB-INF下面的web.xml,给classPath加上*号,解决!
随机推荐
- hibernate Session一级缓存 应该注意的地方
Session缓存 Hibernate的一级缓存是由Session提供的,因此它存在于Session的整个生命周期中,当程序调用save()/update()/saveOrupdate()/get() ...
- C#实现按键精灵的'找图' '找色' '找字'的功能
http://www.cnblogs.com/JimmyBright/p/4355862.html 背景:游戏辅助功能通常使用按键精灵编写脚本,按键精灵的最大卖点就是能够找到画面中字,图,色,这对于模 ...
- 如何使用NSOperations和NSOperationQueues
原文地址: http://www.raywenderlich.com/19788/how-to-use-nsoperations-and-nsoperationqueues 本文由 大侠自来也(泰然教 ...
- UESTC 485 Game(康托,BFS)
Today I want to introduce an interesting game to you. Like eight puzzle, it is a square board with 9 ...
- SQL Server函数
阅读目录 SQL Server函数---Union与Union All的区别 回到顶部 SQL Server函数---Union与Union All的区别 如果我们需要将两个select语句的结果作为 ...
- 构造函数强制使用new
function Car(model, year, miles) { if (!(this instanceof Car)) { return new Car(model, year, miles); ...
- jquery.fileDownload plugin: Success msg alert before actual pdf download completed
Currently , I use jquery fileDownload plugin to download multiple pdf that in a list page, which eve ...
- 如何安装secureCRT8.1破解
安装地址 网盘: https://pan.baidu.com/s/1iGxi6BTCMC_jewCwcUHhgA 密码: u6jq 安装教程 1.点击安装 2.全部默认即可,安装完成之后再桌面上右击该 ...
- argparse 模块 在终端执行脚本文件
1.案例 #1.案例: import argparse #首先导入模块 parser = argparse.ArgumentParser() #创建一个解析对象 parser.add_argument ...
- Linux中的系统默认日志
/var/log/cron 记录了系统定时任务相关的日志 /var/log/cups 记录了打印信息的日志 /var/log/dmesg 记录了系统在开机时内核自检的信息,可以通过dmesg命令直接查 ...