title: How to avoid the use of Spring annotations in my java beans and use them only in the configuration class?
body: <p>I'm new in Spring and this is my first post here, I'm starting to use spring annotations, I was able to cofigure my project using XML configuration and now I'm able to configure it using only annotations and avoiding XML.</p>
  
  <p>But my current need is to avoid the use of annotations in my java classes (beans) and use it only in my <code>AppConfig.java</code> class which I use to configure Spring.</p>
  
  <p>This is my current working configuration:</p>
  
  <p><strong>AppConfig.java</strong></p>
  
  <pre><code>@Configuration
  @ComponentScan(basePackageClasses= {BlocBuilder.class,... all my classes go here})
  public class AppConfig {
  
  
    @Bean
    @Scope("prototype")
    public BlocBuilder blocBuilder(){ 
        return new BlocBuilder();
    }
  
  }
  </code></pre>
  
  <p>And this is one of my java classes.</p>
  
  <p><strong>BlocBuilder.java</strong></p>
  
  <pre><code>public class BlocBuilder {
  
  @Autowired
  @Qualifier("acServices")
  private SomeInterface someInterface;
  
  public SomeInterface getSomeInterface() {
      return someInterface;
  }
  public void setSomeInterface(SomeInterface someInterface) {
      this.someInterface = someInterface;
  }
  </code></pre>
  
  <p>What I want to achieve is to avoid the use of annotations in my classes for example in my <code>BlocBuilder.java</code> class I don't want to have annotations and move them to my config class.</p>
  
  <p>How can I manage it? </p>
  
  <p>Any help whould be really appreciated.</p>