接口的使用
cn.taketoday.web.servlet.WebApplicationContext
使用WebApplicationContext的程序包
-
cn.taketoday.web.servlet中WebApplicationContext的使用
修饰符和类型接口说明interfaceInterface to be implemented by configurable web application contexts.修饰符和类型字段说明private WebApplicationContextContextLoader.contextThe root WebApplicationContext instance that this loader manages.private static WebApplicationContextContextLoader.currentContextThe 'current' WebApplicationContext, if the ContextLoader class is deployed in the web app ClassLoader itself.类型参数类型为WebApplicationContext的cn.taketoday.web.servlet中的字段修饰符和类型字段说明private static final Map<ClassLoader,WebApplicationContext> ContextLoader.currentContextPerThreadMap from (thread context) ClassLoader to corresponding 'current' WebApplicationContext.修饰符和类型方法说明protected WebApplicationContextContextLoader.createWebApplicationContext(ServletContext sc) Instantiate the root WebApplicationContext for this loader, either the default context class or a custom context class if specified.static WebApplicationContextServletUtils.findWebApplicationContext(ServletRequest request) Look for the WebApplicationContext associated with the DispatcherServlet that has initiated request processing, and for the global context if none was found associated with the current request.static WebApplicationContextServletUtils.findWebApplicationContext(ServletRequest request, ServletContext servletContext) Look for the WebApplicationContext associated with the DispatcherServlet that has initiated request processing, and for the global context if none was found associated with the current request.static WebApplicationContextContextLoader.getCurrentWebApplicationContext()Obtain the Framework root web application context for the current thread (i.e. for the current thread's context ClassLoader, which needs to be the web application's ClassLoader).protected final WebApplicationContextWebApplicationObjectSupport.getWebApplicationContext()Return the current application context as WebApplicationContext.ContextLoader.initWebApplicationContext(ServletContext servletContext) Initialize Framework's web application context for the given servlet context, using the application context provided at construction time, or creating a new one according to the "contextClass" and "contextConfigLocation" context-params.修饰符和类型方法说明static RequestContextServletUtils.getRequestContext(WebApplicationContext webApplicationContext, HttpServletRequest request, HttpServletResponse response) 限定符构造器说明ContextLoader(WebApplicationContext context) Create a newContextLoaderwith the given application context.Create a newContextLoaderListenerwith the given application context. -
cn.taketoday.web.servlet.support中WebApplicationContext的使用
修饰符和类型类说明classAbstractRefreshableApplicationContextsubclass which implements theConfigurableWebApplicationContextinterface for web environments.classWebApplicationContextimplementation which accepts component classes as input — in particular@Configurationclasses, but also plain@Componentclasses as well as JSR-330 compliant classes usingjakarta.injectannotations.classSubclass ofGenericApplicationContext, suitable for web servlet environments.classStaticWebApplicationContextimplementation for testing.classWebApplicationContextimplementation which takes its configuration from XML documents, understood by anXmlBeanDefinitionReader.修饰符和类型方法说明static WebApplicationContextWebApplicationContextUtils.findWebApplicationContext(ServletContext sc) Find a uniqueWebServletApplicationContextfor this web app: either the root web app context (preferred) or a uniqueWebServletApplicationContextamong the registeredServletContextattributes (typically coming from a singleDispatcherServletin the current web application).static WebApplicationContextWebApplicationContextUtils.getRequiredWebApplicationContext(ServletContext sc) Find the rootWebServletApplicationContextfor this web app, typically loaded viaContextLoaderListener.static WebApplicationContextWebApplicationContextUtils.getWebApplicationContext(ServletContext sc) Find the rootWebServletApplicationContextfor this web app, typically loaded viaContextLoaderListener.static WebApplicationContextWebApplicationContextUtils.getWebApplicationContext(ServletContext sc, String attrName) Find a customWebServletApplicationContextfor this web app.