Posts

Showing posts from February, 2008

Spring Framework Sample Main Method

So my desk-mate* and I were having a conversation about an upcoming coding project, and he remarked how nice it was for someone, somewhere to post a complete sample on their blog for the spiders to index, so that he can find it. So I thought I would also, pay it forward and hopefully someone in like 2012 comes by and needs a sample main method using the spring spring framework for application level dependency injection. Everyone out there seems to have used the MVC and deploying spring based apps in a web server WAR file. Except for this link: Levarage Spring Web development with Offspring . [Offtopic: it uses classes in the com.offspring.* package, like the band's website !] It uses a simple bean file and a main method really close to the following snippet to instantiate (that's my new favorite word) the application using the spring context**: import org.springframework.context.ApplicationContext; import org.springframework.context.support.ClassPathXmlApplicationContext;