Merge branch '6.1.x'
This commit is contained in:
commit
0110c5ac82
|
@ -62,7 +62,7 @@ class EnableCachingIntegrationTests {
|
||||||
// attempt was made to look up the AJ aspect. It's due to classpath issues
|
// attempt was made to look up the AJ aspect. It's due to classpath issues
|
||||||
// in integration-tests that it's not found.
|
// in integration-tests that it's not found.
|
||||||
assertThatException().isThrownBy(ctx::refresh)
|
assertThatException().isThrownBy(ctx::refresh)
|
||||||
.withMessageContaining("AspectJCachingConfiguration");
|
.withMessageContaining("AspectJCachingConfiguration");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -541,8 +541,7 @@ public class EnvironmentSystemIntegrationTests {
|
||||||
{
|
{
|
||||||
ConfigurableApplicationContext ctx = new AnnotationConfigApplicationContext();
|
ConfigurableApplicationContext ctx = new AnnotationConfigApplicationContext();
|
||||||
ctx.getEnvironment().setRequiredProperties("foo", "bar");
|
ctx.getEnvironment().setRequiredProperties("foo", "bar");
|
||||||
assertThatExceptionOfType(MissingRequiredPropertiesException.class).isThrownBy(
|
assertThatExceptionOfType(MissingRequiredPropertiesException.class).isThrownBy(ctx::refresh);
|
||||||
ctx::refresh);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|
|
@ -97,9 +97,8 @@ class EnableTransactionManagementIntegrationTests {
|
||||||
// this test is a bit fragile, but gets the job done, proving that an
|
// this test is a bit fragile, but gets the job done, proving that an
|
||||||
// attempt was made to look up the AJ aspect. It's due to classpath issues
|
// attempt was made to look up the AJ aspect. It's due to classpath issues
|
||||||
// in integration-tests that it's not found.
|
// in integration-tests that it's not found.
|
||||||
assertThatException()
|
assertThatException().isThrownBy(ctx::refresh)
|
||||||
.isThrownBy(ctx::refresh)
|
.withMessageContaining("AspectJJtaTransactionManagementConfiguration");
|
||||||
.withMessageContaining("AspectJJtaTransactionManagementConfiguration");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|
|
@ -213,8 +213,16 @@ public class ReflectiveAspectJAdvisorFactory extends AbstractAspectJAdvisorFacto
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
return new InstantiationModelAwarePointcutAdvisorImpl(expressionPointcut, candidateAdviceMethod,
|
try {
|
||||||
this, aspectInstanceFactory, declarationOrderInAspect, aspectName);
|
return new InstantiationModelAwarePointcutAdvisorImpl(expressionPointcut, candidateAdviceMethod,
|
||||||
|
this, aspectInstanceFactory, declarationOrderInAspect, aspectName);
|
||||||
|
}
|
||||||
|
catch (IllegalArgumentException | IllegalStateException ex) {
|
||||||
|
if (logger.isDebugEnabled()) {
|
||||||
|
logger.debug("Ignoring incompatible advice method: " + candidateAdviceMethod, ex);
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
|
|
|
@ -2,15 +2,21 @@
|
||||||
<beans xmlns="http://www.springframework.org/schema/beans"
|
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
xmlns:aop="http://www.springframework.org/schema/aop"
|
xmlns:aop="http://www.springframework.org/schema/aop"
|
||||||
|
xmlns:cache="http://www.springframework.org/schema/cache"
|
||||||
xmlns:context="http://www.springframework.org/schema/context"
|
xmlns:context="http://www.springframework.org/schema/context"
|
||||||
xsi:schemaLocation="http://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring-beans-2.0.xsd
|
xsi:schemaLocation="http://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring-beans-2.0.xsd
|
||||||
http://www.springframework.org/schema/aop https://www.springframework.org/schema/aop/spring-aop-2.0.xsd
|
http://www.springframework.org/schema/aop https://www.springframework.org/schema/aop/spring-aop-2.0.xsd
|
||||||
|
http://www.springframework.org/schema/cache https://www.springframework.org/schema/cache/spring-cache-3.1.xsd
|
||||||
http://www.springframework.org/schema/context https://www.springframework.org/schema/context/spring-context-2.5.xsd">
|
http://www.springframework.org/schema/context https://www.springframework.org/schema/context/spring-context-2.5.xsd">
|
||||||
|
|
||||||
<aop:aspectj-autoproxy/>
|
<aop:aspectj-autoproxy/>
|
||||||
|
|
||||||
<context:spring-configured/>
|
<context:spring-configured/>
|
||||||
|
|
||||||
|
<cache:annotation-driven mode="aspectj"/>
|
||||||
|
|
||||||
|
<bean id="cacheManager" class="org.springframework.cache.support.NoOpCacheManager"/>
|
||||||
|
|
||||||
<bean id="myAspect" class="org.springframework.aop.aspectj.autoproxy.CodeStyleAspect" factory-method="aspectOf">
|
<bean id="myAspect" class="org.springframework.aop.aspectj.autoproxy.CodeStyleAspect" factory-method="aspectOf">
|
||||||
<property name="foo" value="bar"/>
|
<property name="foo" value="bar"/>
|
||||||
</bean>
|
</bean>
|
||||||
|
|
|
@ -24,8 +24,7 @@
|
||||||
</property>
|
</property>
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
<bean id="defaultCache"
|
<bean id="defaultCache" class="org.springframework.cache.concurrent.ConcurrentMapCacheFactoryBean">
|
||||||
class="org.springframework.cache.concurrent.ConcurrentMapCacheFactoryBean">
|
|
||||||
<property name="name" value="default"/>
|
<property name="name" value="default"/>
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
|
|
|
@ -7,12 +7,10 @@
|
||||||
http://www.springframework.org/schema/task
|
http://www.springframework.org/schema/task
|
||||||
https://www.springframework.org/schema/task/spring-task.xsd">
|
https://www.springframework.org/schema/task/spring-task.xsd">
|
||||||
|
|
||||||
<task:annotation-driven mode="aspectj" executor="testExecutor"
|
<task:annotation-driven mode="aspectj" executor="testExecutor" exception-handler="testExceptionHandler"/>
|
||||||
exception-handler="testExceptionHandler"/>
|
|
||||||
|
|
||||||
<task:executor id="testExecutor"/>
|
<task:executor id="testExecutor"/>
|
||||||
|
|
||||||
<bean id="testExceptionHandler"
|
<bean id="testExceptionHandler" class="org.springframework.aop.interceptor.SimpleAsyncUncaughtExceptionHandler"/>
|
||||||
class="org.springframework.aop.interceptor.SimpleAsyncUncaughtExceptionHandler"/>
|
|
||||||
|
|
||||||
</beans>
|
</beans>
|
||||||
|
|
Loading…
Reference in New Issue