Spring

Programmatically add @Controllers to Spring MVC

Recently I had a requirement to provide a controller as part of a reusable framework that was included in multiple projects. Typically, creating a controller is as simple tagging a class with @Controller and making sure it’s in a package that is scanned, thanks to the annotation scanning introduced in Spring MVC 2.5, however in this case we couldn’t rely solely… Read more →

Spring MVC w/ no XML

Just a quick update: finally figured out how to setup Spring MVC without any XML during my lunch break.. Yeah, I’m a nerd like that. Spring for lunch. Anywho, on to setup Spring MVC without XML (as in no applicationContext.xml file). There’s two approaches you can take: Configure a global ApplicationContext via the ContextLoaderListener that bootstraps Spring in the J2EE web.xml file (thus… Read more →