Skip to content

AnnotationFormatterFactory should support @AliasFor [SPR-14844] #19410

Closed
@spring-projects-issues

Description

@spring-projects-issues

Sebastian Davids opened SPR-14844 and commented

Pseudo code:

public @interface MyAnnotation {
   @AliasFor("alias")
   String value() default "";

   @AliasFor("value")
   String alias() default "not aliased";
}
public class Bean {
   @MyAnnotation("aliased")
   private String toBeAliased;
//...
}
public class MyAnnotationFormatterFactory implements AnnotationFormatterFactory<MyAnnotation> {

  public Printer<?> getPrinter(MyAnnotation annotation, Class<?> fieldType) {
      String alias = annotation.alias();
//...
}

Expectation would be alias to be "aliased" and not "not aliased".


Affects: 4.3.3

Issue Links:

Referenced from: commits 62918ca, bf9083d

Metadata

Metadata

Assignees

Labels

in: coreIssues in core modules (aop, beans, core, context, expression)type: enhancementA general enhancement

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions