title: Alternative for @Autowired in Spring, which won't initialize the bean before test class setup
body: <p>I have a Spring Bean class which communicates with the DB, and I'm working on writing a test case for it.</p>
  
  <p>I'm making use of DbUnit which sets up an in-memory database (based on extending a base DbUnit class) using JUnit Annotation <strong>@Before</strong>.</p>
  
  <p>The issue is with the <strong>@Autowired</strong> bean I'm trying to test: it accesses the database in its <strong>@Postconstruct</strong> method, and this happens before DB Setup, note the class itself is annotated with <strong>@Component</strong>.</p>
  
  <p>So, I need a way or annotation to use so that the bean I'm testing gets initialized only after the @Before JUnit method runs.</p>