spring mvc - What is the purpose of SpringContextLoaderListener -
i trying understand of springcontextloaderlistener. i.e why need it? loosely understand required start spring. http://www.coderanch.com/t/490458/spring/purpose-contextloaderlistener mean start spring application context? load dispatcher servlet kind of main spring controller?
at core of spring framework root application context. (i.e. registry of configured beans.) this context must somehow initialized. there many ways now, in java web server environment, the direct way use springcontextloaderlistener.
use of listener allows root application context initialized before components of spring's web mvc (such dispatcher servlets). beans , configuration of root context shared/reused "child application contexts" created in dispatcher servlets, etc.
more info:
http://static.springsource.org/spring/docs/3.2.x/spring-framework-reference/html/mvc.html#mvc-servlet (scroll down few paragraphs read dispatcher use of child contexts)
if new spring/java, recommend ignoring next part serve confuse you:
be aware servlet 3.x specification, there other less intuitive ways initialize application context in web environment, based on using annotations. these newer techniques not better. starting points more info:
Comments
Post a Comment