Spring root WebApplicationContext for Servlet

后端 未结 1 1386
太阳男子
太阳男子 2021-01-13 06:04

I have a webapp that uses SpringMVC DispatcherServlet to load a WebApplicationContext. The Spring reference documentation says:

\"each DispatcherServ

1条回答
  •  花落未央
    2021-01-13 06:55

    We have applicationContext.xml in theWEB-INF directory, and the beans in that config are available to the spring-servlet.xml config, its defined using

    
        contextConfigLocation
        /WEB-INF/applicationContext.xml
    
    

    By the way its the ContextLoaderListener which is responsible for managing the root context

    
        org.springframework.web.context.ContextLoaderListener
    
    

    0 讨论(0)
提交回复
热议问题