springMVC中web.xml中classpath的作用,及使用grandle构建项目
来源:互联网 发布:高仿爱奇艺影视源码 编辑:程序博客网 时间:2024/06/04 19:41
在做一个简单的spring项目时,想到要是把所有的配置文件整合在一起包下是不是就显得很干净。结果就开始报错,加载不到配置文件
org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document from class path resource [springmvc-servlet.xml]; nested exception is java.io.FileNotFoundException: class path resource [springmvc-servlet.xml] cannot be opened because it does not exist
此处是显示servlet.xml不存在,servlet的配置文件存放位置如下
其中web.xml的配置如下
根据这个classpath是没有办法读取到servlet.xml这个配置文件,是因为classpath的路径的原因,要是想解决可是进行gradle的构建使其资源能在classpath下读取到
若是不想这样的构造,可以直接将servlet.xml直接放在src下面即可,具体classpath和classpath*,还有其后面的路径写法,大家可以自己查询一下
0 0
- springMVC中web.xml中classpath的作用,及使用grandle构建项目
- Spring——WEB项目web.xml文件中classpath: 跟classpath*:使用的区别
- WEB项目web.xml文件中classpath: 跟classpath*:使用的区别
- Web项目中 .classpath、.mymetadata、.project文件的作用详解
- Web项目中 .classpath、.mymetadata、.project文件的作用
- SSH-Web项目中 .classpath、.mymetadata、.project文件的作用
- Web项目中 .classpath、.mymetadata、.project文件的作用
- Web项目中 .classpath、.mymetadata、.project文件的作用
- Web项目中 .classpath、.mymetadata、.project文件的作用
- web.xml中listener作用及使用
- web.xml中listener作用及使用
- web.xml中listener作用及使用
- web.xml中listener作用及使用
- web.xml中listener作用及使用
- web.xml中listener作用及使用
- web.xml中listener的作用及使用
- web.xml中listener的作用及使用
- web.xml中listener的作用及使用(转)
- 基于抽象布局和炒鸡牛鼻adapter写的base下拉刷新功能,只需要一点点代码,就实现了不同数据的下拉刷新
- iOS崩溃日志收集
- 《您的设计模式》(CBF4LIFE)之“观察者模式”【整理】
- php封装分页类+分页实例
- java jsp 项目 javascript 文件合并压缩工具 AutoJS
- springMVC中web.xml中classpath的作用,及使用grandle构建项目
- ubuntu16.04 安装jdk、tomcat教程
- animation动画详解
- 最新App、手机网站尺寸规范—移动设备界面UI设计尺寸规范
- Xcode6.4注册URL Scheme步骤详解
- openlayers从入门到精通
- Ubuntu删除日志文件
- node.js 融云sdk 获取token
- ndis中间层 发包