-
Notifications
You must be signed in to change notification settings - Fork 38.5k
Introduce unified support for declaring and looking up annotation attribute aliases [SPR-11512] #16137
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
Comments
Sam Brannen commented Current development work can be seen in my #16137 feature branch on GitHub. Feel free to comment. |
Sam Brannen commented Implemented as described in the comments for GitHub commit ca66e07:
|
Sam Brannen opened SPR-11512 and commented
Status Quo
Limited support for annotation attribute aliases already exists in the Spring Framework but is scattered across various modules. Currently, the following annotations are known to support aliases:
@ManagedResource
@ActiveProfiles
@ContextConfiguration
@Sql
@TestExecutionListeners
@TestPropertySource
@ControllerAdvice
Goal
The goal of this issue is to introduce unified support for declaring and looking up annotation attribute aliases (within a given annotation).
Deliverables
All annotations introduced in conjunction with this issue must reside in the
org.springframework.core.annotation
package.@AliasFor
@AliasedBy
AnnotationUtils
andAnnotatedElementUtils
as appropriate.AnnotationConfigurationException
must be thrown indicating that only one attribute for an aliased attribute may be specified in a concrete instance of the given annotation.@ControllerAdvice
and@ManagedResource
.Example: Modified
@ContextConfiguration
DeclarationThe following demonstrates how
@ContextConfiguration
could be rewritten to take advantage of the functionality proposed by this issue.Affects: 4.0 GA
Issue Links:
@RequestMapping
annotations ("is depended on by")@AliasFor
("is depended on by")The text was updated successfully, but these errors were encountered: