title: Static Class Needs to Use a Spring Managed Class
body: <p>I have a static initialization block that accesses a class through Spring.  How can I ensure that the Spring Container is loaded before the static class?</p>
  
  <pre><code>public class A {
  }
  
  public class B {
       static {
            ctx.getBean(A.class); // error if container is not ready
       }
  }
  </code></pre>