0

With a minimal Spring Boot Application at version 3.0.4 (current stable version) using spring-retry with @EnableRetry, I see the following warning:

2023-03-06T17:23:58.313-05:00  WARN 97421 --- [           main] o.s.c.annotation.AnnotationTypeMapping   : Support for convention-based annotation attribute overrides is deprecated and will be removed in Spring Framework 6.1. Please annotate the following attributes in @org.springframework.retry.annotation.EnableRetry with appropriate @AliasFor declarations: [proxyTargetClass]

To reproduce:

  1. Create a gradle app using spring intializr
  2. Add implementation 'org.springframework.retry:spring-retry' and implementation 'org.springframework:spring-aspects' to build.gradle.
  3. Add @EnableRetry to DemoApplication.java.
  4. Run the application.

Is this a bug, or is my application misconfigured?

Chad Showalter
  • 211
  • 1
  • 12

1 Answers1

0

It is not a bug but just a friendly reminder warning that some code pattern that @EnableRetry is using now will be deprecated in the future Spring version. (See this for details.). So you can see its logging level is WARN only.

As the codes that causes this warning is not written by you , you do not need to worry about it.

Ken Chan
  • 84,777
  • 26
  • 143
  • 172
  • I don't expect a warning if I'm using an API in the current, recommended way. Am I to conclude that `@EnableRetry` itself is deprecated? If so, I believe the spring-retry authors should deprecate it and provide instructions for an alternative coding construct. – Chad Showalter Mar 07 '23 at 12:44
  • No. `@EnableRetry` is not deprecated . You can still use it. It is just some code implementation details of `@EnableRetry` will be deprecated and you do not need to worry about how it. Just likes suppose you are using MacOS , and just one of its internal function will be deprecated soon does not mean that the whole MacOS will be deprecated which cause you should not use your MacOS if that makes more sense to you – Ken Chan Mar 07 '23 at 12:51
  • 1
    It's a known problem and fixed; it will be in the spring-retry 2.0.1 release when it is released. https://github.com/spring-projects/spring-retry/pull/322 Currently planned for March 17. – Gary Russell Mar 07 '23 at 14:37