HISPACTA Hell

Monday, July 27, 2009

Spring load order: applicationContext vs. dispatcher-servlet

I've forgotten this more times that I care to admit, so let me just write it down in my own words to get it to sink in:

* an applicationContext.xml is "global" for all beans except for BeanFactoryPostProcessor / BeanPostProcessor (s) - like “PropertyPlaceholderConfigurer” for example. These guys apply ONLY to beans in its own context.

* each servlet defined by a dispatcher-servlet.xml represents a child application context that inherits the beans from the parent (root) app context.

Here...this guy says it better than I do:

http://blog.dotkam.com/2008/07/09/spring-web-application-context-visibility/

0 Comments:

Post a Comment

<< Home