title: Good practice for placing Spring @Configuration for registering @Beans in context?
body: <p>I've decided I want to register Spring Beans in the java code and I want to know how it should be done the best way possible.</p>
  
  <p>I inject deps through constructor (do not want to use @Autowire - I consider it almost antipattern) and I can make it work by adding:</p>
  
  <pre><code>@Configuration
   public class Config {
  @Bean   
   public BeanType getBeanType() {
   return new BeanType();
   }
    }
  </code></pre>
  
  <p>BUT. Where the @Configuration part should go?</p>
  
  <p>Should I make a Config class per package? (trying to make code closed in packages/domains)</p>
  
  <p>Should I register them in inner classes of classed that are using them? </p>
  
  <p>How should it be done? Internet is full of antipatterns, I want to find the way that is thought through carefully.</p>
  
  <p>Thanks in advance for any advice.</p>