AnnotationConfigServletWebServerApplicationContext
2020-04-21 11:45:08 0 举报
SpringBoot中创建ApplicationContext
作者其他创作
大纲/内容
GenericWebApplicationContext
+getResourcePatternResolver():ResourcePatternResolver=new ServletContextResourcePatternResolver()-createEnvironment():protected ConfigurableEnvironment=new StandardServletEnvironment()
AnnotatedBeanDefinitionReader
+ registry:private final BeanDefinitionRegistry registry- beanNameGenerator:private BeanNameGenerator=AnnotationBeanNameGenerator.INSTANCE- scopeMetadataResolver:private ScopeMetadataResolver=new AnnotationScopeMetadataResolver()- conditionEvaluator:private ConditionEvaluator
<<interface>>PropertyResolver
<<FI>>ScopeMetadataResolver
+ resolveScopeMetadata(BeanDefinition definition):ScopeMetadata
DefaultResourceLoader
+classLoader:ClassLoader= ClassUtils.getDefaultClassLoader()
<<public static inner class>>StubPropertySource
+ StubPropertySource(String name):public+ getProperty(String name):public String
PropertySourcesPropertyResolver
+propertySources:private final PropertySources
+PropertySourcesPropertyResolver(PropertySources propertySources):public
ServletWebServerApplicationContext
StandardServletEnvironment
+ SERVLET_CONTEXT_PROPERTY_SOURCE_NAME:public static final String = \"servletContextInitParams\"- SERVLET_CONFIG_PROPERTY_SOURCE_NAME:public static final String = \"servletConfigInitParams\"- JNDI_PROPERTY_SOURCE_NAME:public static final String = \"jndiProperties\"
customizePropertySources(MutablePropertySources):protected void
<<interface>>ResourceLoader
+getResource(String):Resource+getClassLoader():ClassLoader
<<interface>>ConfigurableListableBeanFactory
AnnotationBeanNameGenerator
+ INSTANCE:public static final AnnotationBeanNameGenerator = new AnnotationBeanNameGenerator()- COMPONENT_ANNOTATION_CLASSNAME:private static final String=\"org.springframework.stereotype.Component\"
MutablePropertySources
+ propertySourceList:private final List<PropertySource<?>>
+ addLast(PropertySource<?>):public void + removeIfPresent(PropertySource<?>):protected void
<<interface>>BeanFactory
<<interface>>ListableBeanFactory
<<abstract>>AbstractApplicationContext
+resourcePatternResolver:ResourcePatternResolver= getResourcePatternResolver()- environment:private ConfigurableEnvironment
+ getEnvironment():ConfigurableEnvironment- createEnvironment():protected ConfigurableEnvironment = StandardEnvironment
PropertyResolver
ConditionEvaluator
+ context:private final ConditionContextImpl
<<abstract>>EnumerablePropertySource<T>
AnnotationScopeMetadataResolver
+ defaultProxyMode:private final ScopedProxyMode defaultProxyMode=ScopedProxyMode.NO- scopeAnnotationType:protected Class<? extends Annotation>=Scope.class;
+ AnnotationScopeMetadataResolver():public
DefaultListableBeanFactory
<<abstract>>PropertySource<T>
+ name:protected final String- source:protected final T
PropertiesPropertySource
AnnotationConfigUtils
+ registerAnnotationConfigProcessors(BeanDefinitionRegistry registry):public static void
<<interface>>WebApplicationContext
+ ROOT_WEB_APPLICATION_CONTEXT_ATTRIBUTE:String = WebApplicationContext.class.getName() + \".ROOT\"- SCOPE_REQUEST:String = \"request\"- SCOPE_SESSION:String = \"session\"- SCOPE_APPLICATION:String = \"application\"- CONTEXT_PARAMETERS_BEAN_NAME:String = \"contextParameters\"- CONTEXT_ATTRIBUTES_BEAN_NAME:String = \"contextAttributes\";+ getServletContext():ServletContext
<<interface>>AnnotationConfigRegistry
+ register(Class<?>..)+ scan(String...)
<<Enum>>ScopedProxyMode
+DEFAULT-NO-INTERFACES-TARGET_CLASS
<<interface>>ApplicationContext
+ getId():String;- getApplicationName():String- getDisplayName():String- getStartupDate():long- getParent():ApplicationContext-getAutowireCapableBeanFactory():AutowireCapableBeanFactory
AnnotationConfigServletWebServerApplicationContext
+ reader:AnnotatedBeanDefinitionReader+ scanner:ClassPathBeanDefinitionScanner
<<interface>>ConfigurablePropertyResolver
<<abstract>>AbstractEnvironment
+ defaultProfiles:Set<String> = \"default\"- propertySources:private final MutablePropertySources = new MutablePropertySources()- propertyResolver:ConfigurablePropertyResolver =new PropertySourcesPropertyResolver(this.propertySources)-
ConfigurableWebApplicationContext
+APPLICATION_CONTEXT_ID_PREFIX:String=WebApplicationContext.class.getName() + \":\"-SERVLET_CONFIG_BEAN_NAME:String=\"servletConfig\"+ setServletContext(ServletContext servletContext):void- setServletConfig(ServletConfig servletConfig)):void- getServletConfig():ServletConfig- setNamespace(String namespace):void- getNamespace():String- setConfigLocation(String configLocation):void- setConfigLocations(String... configLocations):void- getConfigLocations():String[]
MapPropertySource<T>
<<abstract>>AbstractPropertyResolver
+ ignoreUnresolvableNestedPlaceholders:private boolean = false- placeholderPrefix:private String =\"${\"- private String placeholderSuffix = \"}\"- valueSeparator:private String = \":\"- requiredProperties:private final Set<String> = new LinkedHashSet<>()
<<interface>>ConfigurableEnvironment
SystemEnviromentPropertySource
<<interface>>ConfigurableApplicationContext
+ CONFIG_LOCATION_DELIMITERS:String = \
<<interface>>AliasRegistry
<<interface>>BeanNameGenerator
<<interface>>Iterable<PropertySource<?>>
<<interface>>PropertySources
StandardEnvironment
+ SYSTEM_ENVIRONMENT_PROPERTY_SOURCE_NAME:public static final String = \"systemEnvironment\"- SYSTEM_PROPERTIES_PROPERTY_SOURCE_NAME:public static final String = \"systemProperties\";
+ customizePropertySources(MutablePropertySources):protected void
GenericApplicationContext
+beanFactory:DefaultListableBeanFactory
getBeanFactory():public final ConfigurableListableBeanFactory
<<interface>>Environment
<<interface>>BeanDefinitionRegistry
<<interface>>EnvironmentCapable
+ getEnvironment():Environment
0 条评论
回复 删除
下一页