在tomcat上运行maven项目

时间:2013-08-30 10:24:40

标签: java spring maven tomcat

我正在使用tomcat 7,当我运行我的Web应用程序(maven项目)时,它给了我这个错误:

Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Failed to import bean definitions from URL location [classpath:hr_demo-security-context.xml]

任何人都可以提供帮助?提前谢谢。

hr_demo安全-context.xml中:

<?xml version="1.0" encoding="UTF-8"?>
<beans:beans xmlns="http://www.springframework.org/schema/security" 
    xmlns:beans="http://www.springframework.org/schema/beans"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:context="http://www.springframework.org/schema/context" 
    xmlns:lang="http://www.springframework.org/schema/lang"
    xsi:schemaLocation="http://www.springframework.org/schema/beans
        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
        http://www.springframework.org/schema/security 
        http://www.springframework.org/schema/security/spring-security-3.0.xsd
        http://www.springframework.org/schema/context 
        http://www.springframework.org/schema/context/spring-context-3.0.xsd">

</beans:beans>

2 个答案:

答案 0 :(得分:0)

syntax存在hr_demo-security-context.xml个问题。

答案 1 :(得分:0)

您对XML文件的代码内引用在部署后不再引用该文件(由于文件在打包后被移动)或者您发布的xml文件被引用,但是其中没有条目Spring感到困惑。