La riga 13 nel documento XML dalla risorsa del percorso classe [ApplicationContextAOP.xml] non è valida; l'eccezione nidificata è org.xml.sax.SAXParseException: cvc-complex-type.2.4.c: il carattere jolly corrispondente è rigoroso, ma non è possibile trovare alcuna dichiarazione per l'elemento 'aop: config'.Spring AOP Il carattere jolly corrispondente è rigoroso, ma non è possibile trovare alcuna dichiarazione per l'elemento 'aop: config'
<?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"
xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.0.xsd">
<bean id="audience" class="com.idol.Audience" />
<aop:config>
<aop:aspect ref="audience">
<!-- Before performance -->
<aop:before pointcut="execution(*com.idol.performers.Performer.perform(..))"
method="takeSeats"/>
<aop:before pointcut="execution(*com.idol.performers.Performer.perform(..))"
method="turnOffCellPhones" />
<!-- After performance -->
<aop:after-returning pointcut="execution(*com.idol.performers.Performer.perform(..))"
method="applaud" />
<!-- After bad performance(exception thrown) -->
<aop:after-throwing pointcut="execution(*com.idol.performers.Performer.perform(..))"
method="demandRefund" />
</aop:aspect>
</aop:config>
<bean id="poeticDuke" class="com.idol.performers.PoeticJuggler">
<constructor-arg value = "15" />
<constructor-arg ref = "sonnet29" />
</bean>
</beans>
Ho visto errore simile e sono abbastanza sicuro che il mio percorso di classe ha org.springframework.aop-3.1.0.M2.jar
Potrebbe mi dica per favore che cosa am Mi manca?
Grazie mille per la tua domanda. Stavo affrontando lo stesso problema, ma nel mio caso il problema era che mi mancava 'spring-aop.jar' nel classpath; questo era quello che mi mancava. Grazie per averlo portato alla mia attenzione. – manuelvigarcia