From 74b7ae2cbde3e7a7ae7a2d21a0129ee3caecaf47 Mon Sep 17 00:00:00 2001 From: Artem Bilan Date: Thu, 12 Sep 2024 11:55:54 -0400 Subject: [PATCH] Remove `@Import(RetryConfiguration.class)` from `@Recover` Looks like that was a copy/paste artifact. The `@Recover` is for business method purpose. The `@Import(RetryConfiguration.class)` is done from the `@EnableRetry` --- .../java/org/springframework/retry/annotation/Recover.java | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/main/java/org/springframework/retry/annotation/Recover.java b/src/main/java/org/springframework/retry/annotation/Recover.java index 2aa47c7..f852184 100644 --- a/src/main/java/org/springframework/retry/annotation/Recover.java +++ b/src/main/java/org/springframework/retry/annotation/Recover.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2013 the original author or authors. + * Copyright 2012-2024 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. @@ -22,8 +22,6 @@ import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; -import org.springframework.context.annotation.Import; - /** * Annotation for a method invocation that is a recovery handler. A suitable recovery * handler has a first parameter of type Throwable (or a subtype of Throwable) and a @@ -38,7 +36,6 @@ import org.springframework.context.annotation.Import; */ @Target({ ElementType.METHOD, ElementType.TYPE }) @Retention(RetentionPolicy.RUNTIME) -@Import(RetryConfiguration.class) @Documented public @interface Recover {