Aug 23rd, 2012, 08:04 AM
Where to perform application bootstrap code?
I have a standard springmvc application that depends on another remote service being available at start up. I was wondering what best practice is in place for where to have some initialisation code that is executed just after all the beans have successfully wired up but before the DispatcherServlet is made ready for requests?
I was thinking perhaps of either extending the DispatcherServlet or the ContextLoaderListener but I'd well imagine this particular scenario has been encountered before and was wondering if there was a way of configuring such initialisation?
Spring 3.1, Tomcat 7, JDK 1.6.0_25