Spring容器类图
2020-03-31 15:22:58 0 举报
spring容器类图
作者其他创作
大纲/内容
AbstractXmlApplicationContext
未知+ operation1(params):returnType- operation2(params)- operation3()
GenericReactiveWebApplicationContext
未知+ operation1(params):returnType - operation2(params)- operation3()
CofigurableListableBeanFactory
font color=\"#ff0000\
GenericXmlApplicationContext
ApplicationEventPublisher
事件处理+ operation1(params):returnType- operation2(params)- operation3()
AbstractRefreshableConfigApplicationContext
FileSystemXmlApplicationContext
WebApplicationContext
ReactiveWebServerApplicationContext
DefaultListableBeanFactory
可以作为一个可以独立使用的ioc容器还是DefaultListableBeanFactory,因此可以这么说,DefaultListableBeanFactory 是整个spring ioc的始祖,研究透它的前生今世对我们理解spring ioc的概念有着重要的作用。在访问bean前,先注册所有的definition(可能从bean definition配置文件中)。使用预先建立的bean定义元数据对象,从本地的bean definition表中查询bean definition因而将不会花费太多成本。+ operation1(params):returnType- operation2(params)- operation3()
AbstractAutowireCapableBeanFactory
实例化bean和依赖注入实现+ operation1(params):returnType- operation2(params)- operation3()
GenericApplicationContext
AnnotationConfigApplicationContext
org.springframework.beans.factory.InitializingBean
为bean提供了初始化方法的方式,它只包括afterPropertiesSet方法,凡是继承该接口的类,在初始化bean的时候都会执行该方法+ operation1(params):returnType- operation2(params)- operation3()
AssertableWebApplicationContext
org.springframework.core.AliasRegistry
DefaultSingletonBeanRegistry
允许注册表中注册的单例应该被所有调用者共享,通过bean名称获得。还支持登记的DisposableBean实例,(这可能会或不能正确的注册单例),关闭注册表时destroyed. 可以注册bean之间的依赖关系,执行适当的关闭顺序+ operation1(params):returnType- operation2(params)- operation3()
ResourceLoader
获取资源的工具+ operation1(params):returnType- operation2(params)- operation3()
groovy.lang.GroovyObject
mop+ operation1(params):returnType- operation2(params)- operation3()
AnnotationConfigServletWebApplicationContext
ReactiveWebApplicationContext
JndiLocatorSupport
HierarchicalBeanFactory
实现分层(自己和其他父工场)+ operation1(params):returnType- operation2(params)- operation3()
Closeable
关闭流并释放与其相关资源+ operation1(params):returnType- operation2(params)- operation3()
GenericWebApplicationContext
ApplicationContextAssertProvider
DefaultResourceLoader
AbstractRefreshableApplicationContext
容器的刷新与创建+ operation1(params):returnType- operation2(params)- operation3()
java.lang.AutoCloseable
对于实现AutoCloseable接口的类的实例,将其放到try后面(我们称之为:带资源的try语句),在try结束的时候,会自动将这些资源关闭(调用close方法)。+ operation1(params):returnType- operation2(params)- operation3()
ApplicationContext
应用上下文+operation1(params):returnType- operation2(params)- operation3()
XmlWebApplicationContext
WebServerApplicationContext
ServletWebServerApplicationContext
ConfigurableBeanFactory
同时继承了分层和单例类注册的功能+ operation1(params):returnType- operation2(params)- operation3()
GenericGroovyApplicationContext
BeanNameAware
感知beanname属性+ operation1(params):returnType- operation2(params)- operation3()
org.springframework.context.Lifecycle
生命周期+ operation1(params):returnType- operation2(params)- operation3()
StubBeanFactory
StubWebApplicationContext的内部类+ operation1(params):returnType- operation2(params)- operation3()
XmlServletWebServerApplicationContext
java.io.Serializable
Serializable是Java提供的序列化接口,是一个空接口,为对象提供标准的序列化与反序列化操作。使用Serializable实现序列化过程相当简单,只需要在类声明的时候指定一个标识,便可以自动的实现默认的序列化过程。+ operation1(params):returnType- operation2(params)- operation3()
EnvironmentCapable
类型检查+ operation1(params):returnType- operation2(params)- operation3()
AnnotationConfigReactiveWebApplicationContext
ConfigurableApplicationContext
配置应用上下文的功能。配置应用上下文和控制应用上下文生命周期的方法在此接口中被封装起来,以免客户端程序直接使用。+ operation1(params):returnType- operation2(params)- operation3()
org.springframework.context.annotation.AnnotationConfigRegistry
注册扫描+ operation1(params):returnType- operation2(params)- operation3()
StaticListableBeanFactory
ResourcePatternResolver
按某种匹配方式来new resource对象 增加匹配功能+ operation1(params):returnType- operation2(params)- operation3()
ResourceAdapterApplicationContext
org.springframework.ui.context.ThemeSource
获取取当前的theme实际内容和mapping关系+ operation1(params):returnType- operation2(params)- operation3()
AssertableReactiveWebApplicationContext
ConfigurableWebServerApplicationContext
XmlBeanFactory
而对于XmlBeanFactory和DefaultListableBeanFactory不同的地方其实是在XmlBeanFactory中使用了自定义的XML读取器XmlBeanDefinitionReader,实现了个性化的BeanDefinitionReader读取在spring4.0中加载配置文件的类发生了变化,spring不在支持使用XmlBeanFactory 创建factory加载配置文件。而是采用了ClassPathXmlApplicationContext创建factory+ operation1(params):returnType- operation2(params)- operation3()
ConfigurableWebApplicationContext
org.springframework.beans.factory.config.SingletonBeanRegistry
对单例bean的操作+ operation1(params):returnType- operation2(params)- operation3()
MessageSource
国际化+ operation1(params):returnType- operation2(params)- operation3()
AnnotationConfigServletWebServerApplicationContext
别名管理器+ operation1(params):returnType- operation2(params)- operation3()
配置bean定义加载路径+ operation1(params):returnType- operation2(params)- operation3()
AnnotationConfigReactiveWebServerApplicationContext
org.springframework.beans.factory.Aware
感知属性+ operation1(params):returnType- operation2(params)- operation3()
FactoryBeanRegistrySupport
针对于FactoryBean类型的bean做处理+ operation1(params):returnType- operation2(params)- operation3()
AbstractBeanFactory
BeanDefinitionRegistry
SimpleAliasRegistry
实现了接口AliasRegistry,别名管理器。内部会缓存这些别名和真实名称的对应关系+ operation1(params):returnType- operation2(params)- operation3()
AssertProvider
AbstractApplicationContext
ApplicationContext接口的一般实现类,通过模板方法的方式,实现了所有应用上下文的通用方法,而将资源获取等细节留给具体实现类来实现。 + operation1(params):returnType- operation2(params)- operation3()
AnnotationConfigWebApplicationContext
org.springframework.beans.factory.BeanFactory
对单个bean操作+ operation1(params):returnType- operation2(params)- operation3()
ListableBeanFactory
GroovyWebApplicationContext
StaticWebApplicationContext
org.springframework.jndi.JndiAccessor
通过getresource方法来new各种resource对象+ operation1(params):returnType- operation2(params)- operation3()
AutowireCapableBeanFactory
扩展了自动装配的功能,根据类定义BeanDefinition装配Bean、执行前、后处理器等+ operation1(params):returnType- operation2(params)- operation3()
ClassPathXmlApplicationContext
StaticApplicationContext
StubWebApplicationContext
SimpleJndiBeanFactory
AssertableApplicationContext
ConfigurableReactiveWebApplicationContext
收藏
0 条评论
下一页