Transaction annotations on interface methods with CGLIB proxies
Issue: SPR-14322
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2016 the original author or authors.
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -150,12 +150,10 @@ public class AnnotationTransactionAttributeSource extends AbstractFallbackTransa
|
||||
* or {@code null} if none was found
|
||||
*/
|
||||
protected TransactionAttribute determineTransactionAttribute(AnnotatedElement ae) {
|
||||
if (ae.getAnnotations().length > 0) {
|
||||
for (TransactionAnnotationParser annotationParser : this.annotationParsers) {
|
||||
TransactionAttribute attr = annotationParser.parseTransactionAnnotation(ae);
|
||||
if (attr != null) {
|
||||
return attr;
|
||||
}
|
||||
for (TransactionAnnotationParser annotationParser : this.annotationParsers) {
|
||||
TransactionAttribute attr = annotationParser.parseTransactionAnnotation(ae);
|
||||
if (attr != null) {
|
||||
return attr;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2016 the original author or authors.
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -39,7 +39,8 @@ public class SpringTransactionAnnotationParser implements TransactionAnnotationP
|
||||
|
||||
@Override
|
||||
public TransactionAttribute parseTransactionAnnotation(AnnotatedElement ae) {
|
||||
AnnotationAttributes attributes = AnnotatedElementUtils.getMergedAnnotationAttributes(ae, Transactional.class);
|
||||
AnnotationAttributes attributes = AnnotatedElementUtils.findMergedAnnotationAttributes(
|
||||
ae, Transactional.class, false, false);
|
||||
if (attributes != null) {
|
||||
return parseTransactionAnnotation(attributes);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user