From 2eb162a59d004c3587a8cbe242155e103b5bce18 Mon Sep 17 00:00:00 2001 From: Markus Heiden Date: Fri, 14 Jan 2022 21:22:29 +0100 Subject: [PATCH] GH-256: Mark RetryConfiguration as infrastructure bean Fixes: https://github.com/spring-projects/spring-retry/issues/256 This suppresses the info message "Bean 'org.springframework.retry.annotation.RetryConfiguration' of type [org.springframework.retry.annotation.RetryConfiguration] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)" during the Spring context start. * Avoid static import, fix copyright year, add author --- .../retry/annotation/RetryConfiguration.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/springframework/retry/annotation/RetryConfiguration.java b/src/main/java/org/springframework/retry/annotation/RetryConfiguration.java index aa7cdf5..cae4c3b 100644 --- a/src/main/java/org/springframework/retry/annotation/RetryConfiguration.java +++ b/src/main/java/org/springframework/retry/annotation/RetryConfiguration.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2021 the original author or authors. + * Copyright 2014-2022 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,6 +39,8 @@ import org.springframework.beans.factory.BeanFactory; import org.springframework.beans.factory.BeanFactoryAware; import org.springframework.beans.factory.InitializingBean; import org.springframework.beans.factory.ListableBeanFactory; +import org.springframework.beans.factory.config.BeanDefinition; +import org.springframework.context.annotation.Role; import org.springframework.core.OrderComparator; import org.springframework.core.annotation.AnnotationUtils; import org.springframework.retry.RetryListener; @@ -59,10 +61,12 @@ import org.springframework.util.ReflectionUtils.MethodCallback; * * @author Dave Syer * @author Artem Bilan + * @author Markus Heiden * @since 1.1 * */ @SuppressWarnings("serial") +@Role(BeanDefinition.ROLE_INFRASTRUCTURE) @Component public class RetryConfiguration extends AbstractPointcutAdvisor implements IntroductionAdvisor, BeanFactoryAware, InitializingBean {