title: Running code after Spring Boot starts
body: <p>I want to run code after my <strong>spring-boot</strong> app starts to monitor a directory for changes.  </p>
  
  <p>I have tried running a new thread but the <code>@Autowired</code> services have not been set at that point.</p>
  
  <p>I have been able to find <code>ApplicationPreparedEvent</code>, which fires before the <code>@Autowired</code> annotations are set.  Ideally I would like the event to fire once the application is ready to process http requests.</p>
  
  <p>Is there a better event to use, or a better way of running code after the application is live in <strong>spring-boot</strong>?</p>