0

I'm using tomcat 7 and when I run my web application(maven project), it gives me this error:

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]

Anyone can help? Thanks in advance.

hr_demo-security-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>
4

2 回答 2

0

您对 XML 文件的代码内引用在部署后不再引用该文件(由于文件在打包后被移动),或者您发布的 xml 文件被引用,但由于其中没有条目,Spring 变得混乱.

于 2013-08-30T14:39:29.480 回答
0

你的有syntax问题hr_demo-security-context.xml

于 2013-08-30T10:29:22.170 回答