title: Spring @Bean(name ="name") vs @Bean @Qualifier("name")
body: <p>Is there any differences between the following 2 bean declaration?</p>
  <pre><code> @Bean(name = &quot;bean1&quot;)
   public A getA() {
       return new A();
   }
  
  
   @Bean
   @Qualifier(&quot;bean1&quot;)
   public A getA() {
       return new A();
   }
  </code></pre>
  <p>Both can be autowired using <code>@Qualifier</code></p>
  <pre><code> @Autowire
   public void test(@Qualifier(&quot;bean1&quot;) A a) {
       ...
   }
  </code></pre>