类 StaticWebApplicationContext

java.lang.Object
cn.taketoday.core.io.DefaultResourceLoader
cn.taketoday.context.support.AbstractApplicationContext
cn.taketoday.context.support.GenericApplicationContext
cn.taketoday.context.support.StaticApplicationContext
cn.taketoday.web.servlet.support.StaticWebApplicationContext
所有已实现的接口:
cn.taketoday.beans.factory.BeanFactory, cn.taketoday.beans.factory.HierarchicalBeanFactory, cn.taketoday.beans.factory.support.BeanDefinitionRegistry, cn.taketoday.beans.factory.support.DependencyInjectorProvider, cn.taketoday.context.ApplicationContext, cn.taketoday.context.ApplicationEventPublisher, cn.taketoday.context.ConfigurableApplicationContext, cn.taketoday.context.Lifecycle, cn.taketoday.context.MessageSource, cn.taketoday.core.AliasRegistry, cn.taketoday.core.env.EnvironmentCapable, cn.taketoday.core.io.PatternResourceLoader, cn.taketoday.core.io.ResourceLoader, ConfigurableWebApplicationContext, WebApplicationContext, Closeable, AutoCloseable

public class StaticWebApplicationContext extends cn.taketoday.context.support.StaticApplicationContext implements ConfigurableWebApplicationContext
Static WebApplicationContext implementation for testing. Not intended for use in production applications.

Implements the ConfigurableWebApplicationContext interface to allow for direct replacement of an XmlWebApplicationContext, despite not actually supporting external configuration files.

Interprets resource paths as servlet context resources, i.e. as paths beneath the web application root. Absolute paths, e.g. for files outside the web app root, can be accessed via "file:" URLs, as implemented by DefaultResourceLoader.

从以下版本开始:
4.0 2022/2/7 13:52
作者:
Rod Johnson, Juergen Hoeller, Harry Yang
  • 嵌套类概要

    从类继承的嵌套类/接口 cn.taketoday.core.io.DefaultResourceLoader

    cn.taketoday.core.io.DefaultResourceLoader.ClassPathContextResource

    从接口继承的嵌套类/接口 cn.taketoday.context.ApplicationContext

    cn.taketoday.context.ApplicationContext.State
  • 字段概要

    字段
    修饰符和类型
    字段
    说明
    private String
     
     
     

    从类继承的字段 cn.taketoday.context.support.GenericApplicationContext

    beanFactory

    从类继承的字段 cn.taketoday.context.support.AbstractApplicationContext

    APPLICATION_EVENT_MULTICASTER_BEAN_NAME, LIFECYCLE_PROCESSOR_BEAN_NAME, log, MESSAGE_SOURCE_BEAN_NAME

    从接口继承的字段 cn.taketoday.context.ApplicationContext

    APPLICATION_NAME

    从接口继承的字段 cn.taketoday.beans.factory.BeanFactory

    FACTORY_BEAN_PREFIX

    从接口继承的字段 cn.taketoday.context.ConfigurableApplicationContext

    CONFIG_LOCATION_DELIMITERS, CONVERSION_SERVICE_BEAN_NAME, LOAD_TIME_WEAVER_BEAN_NAME, SHUTDOWN_HOOK_THREAD_NAME

    从接口继承的字段 cn.taketoday.web.servlet.ConfigurableWebApplicationContext

    SERVLET_CONFIG_BEAN_NAME

    从接口继承的字段 cn.taketoday.core.io.PatternResourceLoader

    CLASSPATH_ALL_URL_PREFIX

    从接口继承的字段 cn.taketoday.core.io.ResourceLoader

    CLASSPATH_URL_PREFIX
  • 构造器概要

    构造器
  • 方法概要

    修饰符和类型
    方法
    说明
    protected cn.taketoday.core.env.ConfigurableEnvironment
    Create and return a new StandardServletEnvironment.
    Return the config locations for this web application context, or null if none specified.
    Return the namespace for this web application context, if any.
    This implementation supports pattern matching in unexpanded WARs too.
    protected cn.taketoday.core.io.Resource
    This implementation supports file paths beneath the root of the ServletContext.
    Return the ServletConfig for this web application context, if any.
    Return the standard Servlet API ServletContext for this application.
    protected void
     
    protected void
    postProcessBeanFactory(cn.taketoday.beans.factory.config.ConfigurableBeanFactory beanFactory)
    Register request/session scopes, a ServletContextAwareProcessor, etc.
    void
    setConfigLocation(String configLocation)
    The StaticWebApplicationContext class does not support this method.
    void
    setConfigLocations(String... configLocations)
    The StaticWebApplicationContext class does not support this method.
    void
    setNamespace(String namespace)
    Set the namespace for this web application context, to be used for building a default context config location.
    void
    Set the ServletConfig for this web application context.
    void
    Set the ServletContext that this WebApplicationContext runs in.

    从类继承的方法 cn.taketoday.context.support.StaticApplicationContext

    addMessage, assertBeanFactoryActive, getStaticMessageSource

    从类继承的方法 cn.taketoday.context.support.GenericApplicationContext

    cancelRefresh, closeBeanFactory, containsBeanDefinition, containsBeanDefinition, containsBeanDefinition, createBootstrapContext, getAliasList, getAutowireCapableBeanFactory, getBeanDefinition, getBeanDefinition, getBeanDefinitionCount, getBeanDefinitionNames, getBeanFactory, getClassLoader, getResource, getResources, isAlias, isAllowBeanDefinitionOverriding, isBeanDefinitionOverridable, isBeanNameInUse, refreshBeanFactory, refreshForAotProcessing, registerAlias, registerBean, registerBean, registerBean, registerBean, registerBean, registerBean, registerBeanDefinition, registerPrototype, registerPrototype, registerSingleton, registerSingleton, registerSingleton, registerSingleton, removeAlias, removeBeanDefinition, scan, setAllowBeanDefinitionOverriding, setAllowCircularReferences, setClassLoader, setParent, setResourceLoader

    从类继承的方法 cn.taketoday.context.support.AbstractApplicationContext

    addApplicationListener, addBeanFactoryPostProcessor, applyState, close, containsBean, containsLocalBean, destroyBeans, doClose, findAllAnnotationsOnBean, findAnnotationOnBean, findAnnotationOnBean, findSynthesizedAnnotation, finishBeanFactoryInitialization, finishRefresh, formatStartupDate, getAliases, getAnnotatedBeans, getApplicationEventMulticaster, getApplicationListeners, getApplicationName, getBean, getBean, getBean, getBean, getBean, getBeanNamesForAnnotation, getBeanNamesForType, getBeanNamesForType, getBeanNamesForType, getBeanNamesForType, getBeanProvider, getBeanProvider, getBeanProvider, getBeanProvider, getBeans, getBeansOfType, getBeansOfType, getBeansOfType, getBeansWithAnnotation, getBeansWithAnnotation, getBootstrapContext, getDisplayName, getEnvironment, getExpressionEvaluator, getId, getInjector, getInternalParentBeanFactory, getInternalParentMessageSource, getLifecycleProcessor, getMessage, getMessage, getMessage, getParent, getParentBeanFactory, getStartupDate, getState, getType, getType, hasStarted, initApplicationEventMulticaster, initLifecycleProcessor, initMessageSource, invokeBeanFactoryPostProcessors, isActive, isPrototype, isRunning, isSingleton, isTypeMatch, isTypeMatch, obtainFreshBeanFactory, onClose, onRefresh, prepareBeanFactory, prepareRefresh, publishEvent, publishEvent, publishEvent, refresh, registerApplicationListeners, registerBeanPostProcessors, registerFrameworkComponents, registerShutdownHook, removeApplicationListener, resetCommonCaches, setBootstrapContext, setDisplayName, setEnvironment, setId, start, stop, toString, unwrapFactory

    从类继承的方法 cn.taketoday.core.io.DefaultResourceLoader

    addProtocolResolver, clearResourceCaches, getProtocolResolvers, getResourceCache

    从类继承的方法 java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    从接口继承的方法 cn.taketoday.core.AliasRegistry

    getAliases

    从接口继承的方法 cn.taketoday.context.ApplicationContext

    getApplicationName, getAutowireCapableBeanFactory, getDisplayName, getExpressionEvaluator, getId, getParent, getStartupDate, getState, hasStarted, unwrapFactory

    从接口继承的方法 cn.taketoday.context.ApplicationEventPublisher

    publishEvent, publishEvent

    从接口继承的方法 cn.taketoday.beans.factory.support.BeanDefinitionRegistry

    containsBeanDefinition

    从接口继承的方法 cn.taketoday.beans.factory.BeanFactory

    containsBean, containsBeanDefinition, findAllAnnotationsOnBean, findAnnotationOnBean, findAnnotationOnBean, findSynthesizedAnnotation, getAliases, getAnnotatedBeans, getBean, getBean, getBean, getBean, getBean, getBeanDefinition, getBeanDefinitionCount, getBeanDefinitionNames, getBeanNamesForAnnotation, getBeanNamesForType, getBeanNamesForType, getBeanNamesForType, getBeanNamesForType, getBeanNamesForType, getBeanProvider, getBeanProvider, getBeanProvider, getBeanProvider, getBeans, getBeansOfType, getBeansOfType, getBeansOfType, getBeansWithAnnotation, getBeansWithAnnotation, getType, getType, isPrototype, isSingleton, isTypeMatch, isTypeMatch, unwrap

    从接口继承的方法 cn.taketoday.context.ConfigurableApplicationContext

    addApplicationListener, addBeanFactoryPostProcessor, addProtocolResolver, close, getBeanFactory, getBootstrapContext, getEnvironment, isActive, refresh, registerShutdownHook, removeApplicationListener, setClassLoader, setEnvironment, setId, setParent

    从接口继承的方法 cn.taketoday.beans.factory.support.DependencyInjectorProvider

    getInjector

    从接口继承的方法 cn.taketoday.beans.factory.HierarchicalBeanFactory

    containsLocalBean, getParentBeanFactory

    从接口继承的方法 cn.taketoday.context.Lifecycle

    isRunning, start, stop

    从接口继承的方法 cn.taketoday.context.MessageSource

    getMessage, getMessage, getMessage

    从接口继承的方法 cn.taketoday.core.io.PatternResourceLoader

    getResources, getResourcesArray, scan

    从接口继承的方法 cn.taketoday.core.io.ResourceLoader

    getClassLoader, getResource