Async annotations on interface methods with CGLIB proxies
Issue: SPR-14949
This commit is contained in:
@@ -47,10 +47,8 @@ import org.springframework.util.ClassUtils;
|
||||
*
|
||||
* @author Juergen Hoeller
|
||||
* @since 3.0
|
||||
* @see org.springframework.dao.annotation.PersistenceExceptionTranslationAdvisor
|
||||
* @see org.springframework.stereotype.Repository
|
||||
* @see org.springframework.dao.DataAccessException
|
||||
* @see org.springframework.dao.support.PersistenceExceptionTranslator
|
||||
* @see Async
|
||||
* @see AnnotationAsyncExecutionInterceptor
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class AsyncAnnotationAdvisor extends AbstractPointcutAdvisor implements BeanFactoryAware {
|
||||
@@ -157,7 +155,7 @@ public class AsyncAnnotationAdvisor extends AbstractPointcutAdvisor implements B
|
||||
ComposablePointcut result = null;
|
||||
for (Class<? extends Annotation> asyncAnnotationType : asyncAnnotationTypes) {
|
||||
Pointcut cpc = new AnnotationMatchingPointcut(asyncAnnotationType, true);
|
||||
Pointcut mpc = AnnotationMatchingPointcut.forMethodAnnotation(asyncAnnotationType);
|
||||
Pointcut mpc = new AnnotationMatchingPointcut(null, asyncAnnotationType, true);
|
||||
if (result == null) {
|
||||
result = new ComposablePointcut(cpc);
|
||||
}
|
||||
|
||||
@@ -25,7 +25,6 @@ import java.util.concurrent.ExecutionException;
|
||||
import java.util.concurrent.Executor;
|
||||
import java.util.concurrent.Future;
|
||||
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
import org.mockito.Mockito;
|
||||
|
||||
@@ -215,7 +214,7 @@ public class EnableAsyncTests {
|
||||
ctx.close();
|
||||
}
|
||||
|
||||
@Test @Ignore // TODO
|
||||
@Test
|
||||
public void spr14949FindsOnInterfaceWithCglibProxy() throws InterruptedException {
|
||||
AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext(Spr14949ConfigB.class);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user