mirror of
https://github.com/spring-projects/spring-framework
synced 2026-06-08 17:33:33 +00:00
Consistently detect resilience annotations on interfaces
Closes gh-36233
This commit is contained in:
+2
-2
@@ -101,14 +101,14 @@ public class ConcurrencyLimitBeanPostProcessor extends AbstractBeanFactoryAwareA
|
||||
interceptor = holder.methodInterceptors.get(method);
|
||||
if (interceptor == null) {
|
||||
boolean perMethod = false;
|
||||
ConcurrencyLimit annotation = AnnotatedElementUtils.getMergedAnnotation(method, ConcurrencyLimit.class);
|
||||
ConcurrencyLimit annotation = AnnotatedElementUtils.findMergedAnnotation(method, ConcurrencyLimit.class);
|
||||
if (annotation != null) {
|
||||
perMethod = true;
|
||||
}
|
||||
else {
|
||||
interceptor = holder.classInterceptor;
|
||||
if (interceptor == null) {
|
||||
annotation = AnnotatedElementUtils.getMergedAnnotation(targetClass, ConcurrencyLimit.class);
|
||||
annotation = AnnotatedElementUtils.findMergedAnnotation(targetClass, ConcurrencyLimit.class);
|
||||
}
|
||||
}
|
||||
if (interceptor == null) {
|
||||
|
||||
+2
-2
@@ -93,9 +93,9 @@ public class RetryAnnotationBeanPostProcessor extends AbstractBeanFactoryAwareAd
|
||||
return retrySpec;
|
||||
}
|
||||
|
||||
Retryable retryable = AnnotatedElementUtils.getMergedAnnotation(method, Retryable.class);
|
||||
Retryable retryable = AnnotatedElementUtils.findMergedAnnotation(method, Retryable.class);
|
||||
if (retryable == null) {
|
||||
retryable = AnnotatedElementUtils.getMergedAnnotation(targetClass, Retryable.class);
|
||||
retryable = AnnotatedElementUtils.findMergedAnnotation(targetClass, Retryable.class);
|
||||
if (retryable == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user