April 05
Prof. Ismael H. F. Santos -  ismael@tecgraf.puc-rio.br                                                          2
Spring on the Web Tier: Integration with Other Frameworks
nSpring integrates nicely with other web frameworks with two methodologies:
nLook up Spring beans within Controllers/Actions via the convenience static method:
nWebApplicationContextUtils.
ngetWebApplicationContext(servletContext).getBean(“beanName”)
n
nConfigure the Controllers/Actions for the web framework in a Spring BeanFactory and then use Spring provided proxies in the actual web framework configuration
nWhen available, this methodology is preferred
nThis approach lets you design your Controllers/Actions with dependency injection and makes your Controller/Actions more testable