Maven + Spring + Apache CXF:java.io.FileNotFoundException:无法打开ServletContext资源

时间:2017-07-26 13:18:54

标签: spring maven cxf

我正在尝试运行本教程:http://camel.apache.org/tutorial-example-reportincident-part1.html

我遇到了Spring和CXF的麻烦,并在启动时遇到了这个错误 mvn jetty:运行

org.springframework.beans.factory.BeanDefinitionStoreException:从ServletContext资源解析XML文档的IOException [/ C:/ Users / Mokhtar / Desktop / maven];嵌套异常是java.io.FileNotFoundException:无法打开ServletContext资源[/ C:/ Users / Mokhtar / Desktop / maven]

这些是我在POM中添加的依赖:

<dependency>
    <groupId>junit</groupId>
    <artifactId>junit</artifactId>
    <version>3.8.1</version>
    <scope>test</scope>
</dependency>
<dependency>
    <groupId>org.apache.cxf</groupId>
    <artifactId>cxf-rt-core</artifactId>
    <version>2.6.1</version>
</dependency>
<dependency>
    <groupId>org.apache.cxf</groupId>
    <artifactId>cxf-rt-frontend-jaxws</artifactId>
    <version>2.6.1</version>
</dependency>
<dependency>
    <groupId>org.apache.cxf</groupId>
    <artifactId>cxf-rt-transports-http</artifactId>
    <version>2.6.1</version>
</dependency>
<dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-web</artifactId>
        <version>3.2.6.RELEASE</version>
    </dependency>

不明白为什么它不起作用

0 个答案:

没有答案