Spring XML-задача

Я пытаюсь написать простую пружину AOP приложение, но у меня есть проблемы с конфигурацией XML.

Мой XML:

<?xml version="1.0" encoding="UTF-8"?>


<beans xmlns="http://www.springframework.org/schema/beans"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
    xmlns:aop="http://www.springframework.org/schema/aop"
    xsi:schemaLocation="http://www.springframework.org/schema/beans 
    http://www.springframework.org/schema/beans/spring-beans-3.0.xsd 
    http://www.springframework.org/schema/aop">

<bean id="audience" class="springaop.Audience">
</bean>

<bean id="sam" class="springaop.Singer">
    <property name="id" value="1"></property>
</bean>

<aop:config>
    <aop:aspect ref="audience">

        <aop:before pointcut="* springaop.Singer.perform(..)" 
        method="takeSeats"></aop:before>

    </aop:aspect>
</aop:config>

</beans>

Я получаю это предупреждение и исключение:

WARNING: Ignored XML validation warning
    org.xml.sax.SAXParseException: SchemaLocation: schemaLocation value = 'http://www.springframework.org/schema/beans  http://www.springframework.org/schema/beans/spring-beans-3.0.xsd   http://www.springframework.org/schema/aop' must have even number of URI's.

Exception: Line 18 in XML document from class path resource [aop-conf.xml] is invalid; nested exception is org.xml.sax.SAXParseException: cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'aop:config'.

также, я не могу понять XMLNS

7
задан sblundy 4 August 2011 в 14:23
поделиться