接口的使用
org.springframework.web.context.ConfigurableWebApplicationContext
使用ConfigurableWebApplicationContext的程序包 程序包 说明 org.springframework.web.context Contains a variant of the application context interface for web applications, and the ContextLoaderListener that bootstraps a root web application context.org.springframework.web.context.support Classes supporting theorg.springframework.web.contextpackage, such as WebApplicationContext implementations and various utility classes.org.springframework.web.servlet Provides servlets that integrate with the application context infrastructure, and the core interfaces and classes for the Spring web MVC framework.org.springframework.web.context中ConfigurableWebApplicationContext的使用
参数类型为ConfigurableWebApplicationContext的org.springframework.web.context中的方法 修饰符和类型 方法 说明 protected voidContextLoader. configureAndRefreshWebApplicationContext(ConfigurableWebApplicationContext wac, ServletContext sc)protected voidContextLoader. customizeContext(ServletContext sc, ConfigurableWebApplicationContext wac)Customize theConfigurableWebApplicationContextcreated by this ContextLoader after config locations have been supplied to the context but before the context is refreshed.org.springframework.web.context.support中ConfigurableWebApplicationContext的使用
实现ConfigurableWebApplicationContext的org.springframework.web.context.support中的类 修饰符和类型 类 说明 classAbstractRefreshableWebApplicationContextAbstractRefreshableApplicationContextsubclass which implements theConfigurableWebApplicationContextinterface for web environments.classAnnotationConfigWebApplicationContextWebApplicationContextimplementation which accepts component classes as input — in particular@Configuration-annotated classes, but also plain@Componentclasses and JSR-330 compliant classes usingjavax.injectannotations.classGenericWebApplicationContextSubclass ofGenericApplicationContext, suitable for web environments.classGroovyWebApplicationContextWebApplicationContextimplementation which takes its configuration from Groovy bean definition scripts and/or XML files, as understood by aGroovyBeanDefinitionReader.classStaticWebApplicationContextStaticWebApplicationContextimplementation for testing.classXmlWebApplicationContextWebApplicationContextimplementation which takes its configuration from XML documents, understood by anXmlBeanDefinitionReader.org.springframework.web.servlet中ConfigurableWebApplicationContext的使用
参数类型为ConfigurableWebApplicationContext的org.springframework.web.servlet中的方法 修饰符和类型 方法 说明 protected voidFrameworkServlet. configureAndRefreshWebApplicationContext(ConfigurableWebApplicationContext wac)protected voidFrameworkServlet. postProcessWebApplicationContext(ConfigurableWebApplicationContext wac)Post-process the given WebApplicationContext before it is refreshed and activated as context for this servlet.