web项目中加载spring容器的方式

1、在Web.xml中,通过ContextLoaderListener加载

 

    contextConfigLocation

    /WEB-INF/daoContext.xml /WEB-INF/applicationContext.xml

    org.springframework.web.context.ContextLoaderListener

 

2、在Web.xml中,通过ContextLoaderServlet加载


    contextConfigLocation

    /WEB-INF/daoContext.xml /WEB-INF/applicationContext.xml

    context

    org.springframework.web.context.ContextLoaderServlet

    1


3、在struts-config.xml中,通过ContextLoaderPlugIn加载


   

 

你可能感兴趣的:(框架整合)