title: Getting spring beans initialization times
body: <p>I have an application with a large spring context which loads lots of beans written by lots of developers.<br>
  Some of the beans may do some significant processing on their initialization code which may take a long time.<br>
  I'm looking for a simple way to get the loading time of each bean.<br>
  Since the software is running on a large number of customers' machines I need a way to find the bottlenecks beans easily in the log.<br>
  If I could register to events such as "Before loading bean" and after it would be great.<br>
  So if I can get this data problematically I can write something like: </p>
  
  <pre><code>if (beanLoadingTime &gt; 2 seconds) 
      print bean details and loading time to log file
  </code></pre>
  
  <p>That's why enabling the logging or profilng isn't enough.</p>