Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AnnotationTypeMapping warning when using @EnableRetry with Spring Framework 6 #322

Merged
merged 1 commit into from
Nov 17, 2022

Conversation

hpoettker
Copy link
Contributor

Any Spring application that uses the annotation @EnableRetry with Spring Framework 6.0.0 and Spring Retry 2.0.0 logs the following warning on start-up:

WARN org.springframework.core.annotation.AnnotationTypeMapping [main] : 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]

This PR does what the warning kindly asks for.

The warning can be seen easiest when executing EnableRetryTests.

I've also assembled a reproducer. It's a plain Spring Boot app with the annotation: https://github.com/hpoettker/alias-demo

@garyrussell garyrussell merged commit 0d71058 into spring-projects:main Nov 17, 2022
@garyrussell
Copy link
Contributor

@hpoettker Thanks for the contribution!

@hpoettker hpoettker deleted the alias-for branch November 17, 2022 17:19
@snicoll snicoll added this to the 2.0.1 milestone Nov 17, 2022
@snicoll snicoll added the bug label Nov 17, 2022
@snicoll snicoll changed the title Annotate @EnableRetry with @AliasFor AnnotationTypeMapping warning when usin @EnableRetry with Spring Framework 6 Nov 17, 2022
@snicoll snicoll changed the title AnnotationTypeMapping warning when usin @EnableRetry with Spring Framework 6 AnnotationTypeMapping warning when using @EnableRetry with Spring Framework 6 Nov 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants