title: Spring Framework AliasFor annotation dilema
body: <p>I am using spring boot (1.3.4.RELEASE) and have a question regarding the new @AliasFor annotation introduced spring framework in 4.2</p>
  
  <p>Consider the following annotations:</p>
  
  <p><strong>View</strong></p>
  
  <pre><code>@Retention(RetentionPolicy.RUNTIME)
  @Target(ElementType.TYPE)
  @Component
  public @interface View {
      String name() default "view";
  }
  </code></pre>
  
  <p><strong>Composite</strong></p>
  
  <pre><code>@Retention(RetentionPolicy.RUNTIME)
  @Target(ElementType.TYPE)
  @View
  public @interface Composite {
      @AliasFor(annotation = View.class, attribute = "name")
      String value() default "composite";
  }
  </code></pre>
  
  <p>We then annotate a simple class as follows</p>
  
  <pre><code>@Composite(value = "model")
  public class Model {
  }
  </code></pre>
  
  <p>When running the following code</p>
  
  <pre><code>ConfigurableApplicationContext context = SpringApplication.run(App.class, args);
  String[] beanNames = context.getBeanNamesForAnnotation(View.class);
  for (String beanName : beanNames) {
      View annotationOnBean = context.findAnnotationOnBean(beanName, View.class);
      System.out.println(annotationOnBean.name());
  }
  </code></pre>
  
  <p>I am expecting the output to be <strong>model</strong>, but it's <strong>view</strong>.</p>
  
  <p>From my understanding, shouldn't <strong>@AliasFor</strong> (among other things) allow you to override attributes from meta-annotations (in this case <strong>@View</strong>)?
  Can someone explain to me what am I doing wrong? 
  Thank you</p>