title: Spring web application healthchecks
body: <p>I'm deploying Spring based web applications on Amazon's Beanstalk platform, and they give me the option of setting a "healthcheck" URL path for my application.</p>
  
  <p>The idea is that their platform will do a request against that URL, after the deployment, to see if the application is successfully started. So, if the request results in an HTTP 200, the application is probably fine. But if it results in an HTTP 500 or something else, the platform knows there's a problem with the application.</p>
  
  <p>So, I wish I could develop some kind of servlet that would check if the Spring Application Context was successfully initialised, or not, to give an appropriate HTTP response code to the platform.</p>
  
  <p>Has anybody attempted something like this? For similar purposes?</p>
  
  <p>I'm wondering if Spring already provides some elegant solution for this.</p>