Test status quo for 'after' advice invocation order

See gh-25186
This commit is contained in:
Sam Brannen
2020-06-04 14:09:02 +02:00
parent 70b3de4afe
commit 63e8609f3b
5 changed files with 361 additions and 26 deletions

View File

@@ -0,0 +1,21 @@
<?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 https://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/aop https://www.springframework.org/schema/aop/spring-aop.xsd">
<bean id="echo" class="org.springframework.aop.config.AopNamespaceHandlerAdviceOrderIntegrationTests$Echo"/>
<bean id="echoAspect" class="org.springframework.aop.config.AopNamespaceHandlerAdviceOrderIntegrationTests$EchoAspect" />
<aop:config>
<aop:aspect id="echoAdvice" ref="echoAspect">
<aop:pointcut id="echoMethod" expression="execution(* echo(*))" />
<aop:after method="after" pointcut-ref="echoMethod" />
<aop:after-throwing method="failed" pointcut-ref="echoMethod" />
<aop:after-returning method="succeeded" pointcut-ref="echoMethod" />
</aop:aspect>
</aop:config>
</beans>

View File

@@ -0,0 +1,21 @@
<?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 https://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/aop https://www.springframework.org/schema/aop/spring-aop.xsd">
<bean id="echo" class="org.springframework.aop.config.AopNamespaceHandlerAdviceOrderIntegrationTests$Echo"/>
<bean id="echoAspect" class="org.springframework.aop.config.AopNamespaceHandlerAdviceOrderIntegrationTests$EchoAspect" />
<aop:config>
<aop:aspect id="echoAdvice" ref="echoAspect">
<aop:pointcut id="echoMethod" expression="execution(* echo(*))" />
<aop:after-returning method="succeeded" pointcut-ref="echoMethod" />
<aop:after-throwing method="failed" pointcut-ref="echoMethod" />
<aop:after method="after" pointcut-ref="echoMethod" />
</aop:aspect>
</aop:config>
</beans>