title: @PostConstruct annotation and spring lifecycle
body: <p>I'm new to Spring, I would like to know: </p>
  
  <p>I have a java class annotated with <code>@Component</code> (spring) and inside I have a method annotated with <code>@PostConstruct</code>. The class is then referenced by <code>@Autowired</code> annotated field in another class. Can I assume that the class is only injected after <code>@PostConstruct</code> is called?</p>
  
  <pre><code>@Component
  class AuthenticationMetrics {
  
      private static final MetricRegistry metrics = new MetricRegistry();
  
      final Counter requestsTotal;
  
      final Meter guestLogins;
  
      final Meter kfUserLogins;
  
      final Timer guestLoginResponseTime;
  
      final Timer kfLoginResponseTime;
  
      @PostConstruct
      public void populateMetricsRegistry() {
          metrics.counter("authentication.requests.totals");
      }
  }
  </code></pre>