接口的使用
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.context
package, 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 void
ContextLoader. configureAndRefreshWebApplicationContext(ConfigurableWebApplicationContext wac, ServletContext sc)
protected void
ContextLoader. customizeContext(ServletContext sc, ConfigurableWebApplicationContext wac)
Customize theConfigurableWebApplicationContext
created 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中的类 修饰符和类型 类 说明 class
AbstractRefreshableWebApplicationContext
AbstractRefreshableApplicationContext
subclass which implements theConfigurableWebApplicationContext
interface for web environments.class
AnnotationConfigWebApplicationContext
WebApplicationContext
implementation which accepts component classes as input — in particular@Configuration
-annotated classes, but also plain@Component
classes and JSR-330 compliant classes usingjavax.inject
annotations.class
GenericWebApplicationContext
Subclass ofGenericApplicationContext
, suitable for web environments.class
GroovyWebApplicationContext
WebApplicationContext
implementation which takes its configuration from Groovy bean definition scripts and/or XML files, as understood by aGroovyBeanDefinitionReader
.class
StaticWebApplicationContext
StaticWebApplicationContext
implementation for testing.class
XmlWebApplicationContext
WebApplicationContext
implementation which takes its configuration from XML documents, understood by anXmlBeanDefinitionReader
.org.springframework.web.servlet中ConfigurableWebApplicationContext的使用
参数类型为ConfigurableWebApplicationContext的org.springframework.web.servlet中的方法 修饰符和类型 方法 说明 protected void
FrameworkServlet. configureAndRefreshWebApplicationContext(ConfigurableWebApplicationContext wac)
protected void
FrameworkServlet. postProcessWebApplicationContext(ConfigurableWebApplicationContext wac)
Post-process the given WebApplicationContext before it is refreshed and activated as context for this servlet.