title: Alternatives to @Autowire for static fields
body: <p>What are alternatives to <code>@Autowire</code> for static fields?</p>
  
  <p>I went through many questions and understood why <code>@Autowired</code> can't be used with static fields. The accepted answer of <a href="https://stackoverflow.com/questions/1018797/autowired-static-field-spring-2-5">this</a> question mentions </p>
  
  <blockquote>
    <p>You'll have to write your own logic to do this., as @Autowired cannot
    be used.</p>
  </blockquote>
  
  <p>As I am new to dependency injection, I did not get what steps would have to be followed to write our own logic to do this. </p>
  
  <p>What I got is that <code>new</code> cannot be used to create the object as it would tightly couple the 2 classes and DI is meant to be a solution for it. Also using <code>@autowired</code> with setters is not recommended in the second answer of the same question. So what are the alternatives to achieve same effect without using <code>@Autowire</code> ?</p>