职业IT人-IT人生活圈

 找回密码
 成为会员
搜索
查看: 993|回复: 9

Spring Web 应用之Web ApplicationContext体系结构

[复制链接]
江南枫 发表于 2011-9-1 11:57 | 显示全部楼层 |阅读模式
  

Spring web的应用为XmlWebApplicationContext,它的主要功能是适应Web应用,如国际化资源加载,配置资源的读取,事件等。在其内部还才真正包含了一个核心的BeanFactory,可以说有闭月羞花之容,倾国倾城之貌。总之解释为“金屋藏娇”
  
public abstract class AbstractRefreshableApplicationContext extends AbstractApplicationContext {   
//属性...   
//其他方法...   
/**  
     * 为上下文创建一个内部BeanFactory工厂  
     * Create an internal bean factory for this context.  
     * Called for each {@link #refresh()} attempt.  
     * <p>The default implementation creates a  
     * {@link org.springframework.beans.factory.support.DefaultListableBeanFactory}  
     * with the {@link #getInternalParentBeanFactory() internal bean factory} of this  
     * context's parent as parent bean factory. Can be overridden in subclasses,  
     * for example to customize DefaultListableBeanFactory's settings.  
     * @return the bean factory for this context  
     * @see org.springframework.beans.factory.support.DefaultListableBeanFactory#setAllowBeanDefinitionOverriding  
     * @see org.springframework.beans.factory.support.DefaultListableBeanFactory#setAllowEagerClassLoading  
     * @see org.springframework.beans.factory.support.DefaultListableBeanFactory#setAllowCircularReferences  
     * @see org.springframework.beans.factory.support.DefaultListableBeanFactory#setAllowRawInjectionDespiteWrapping  
     */  
    protected DefaultListableBeanFactory createBeanFactory() {   
        return new DefaultListableBeanFactory(getInternalParentBeanFactory());   
    }   
//其他方法...   
}  

public abstract class AbstractRefreshableApplicationContext extends AbstractApplicationContext {
//属性...
//其他方法...
/**
         * 为上下文创建一个内部BeanFactory工厂
         * Create an internal bean factory for this context.
         * Called for each {@link #refresh()} attempt.
         * <p>The default implementation creates a
         * {@link org.springframework.beans.factory.support.DefaultListableBeanFactory}
         * with the {@link #getInternalParentBeanFactory() internal bean factory} of this
         * context's parent as parent bean factory. Can be overridden in subclasses,
         * for example to customize DefaultListableBeanFactory's settings.
         * @return the bean factory for this context
         * @see org.springframework.beans.factory.support.DefaultListableBeanFactory#setAllowBeanDefinitionOverriding
         * @see org.springframework.beans.factory.support.DefaultListableBeanFactory#setAllowEagerClassLoading
         * @see org.springframework.beans.factory.support.DefaultListableBeanFactory#setAllowCircularReferences
         * @see org.springframework.beans.factory.support.DefaultListableBeanFactory#setAllowRawInjectionDespiteWrapping
         */
        protected DefaultListableBeanFactory createBeanFactory() {
                return new DefaultListableBeanFactory(getInternalParentBeanFactory());
        }
//其他方法...
} DefaultListableBeanFactory 现在目睹阿娇之倾国倾城之容:

欢迎大家指导意见,会进行后续更新,请大家关注。


yoyo 发表于 2011-9-1 11:57 | 显示全部楼层
呵呵

我看到了 我经常用的 WebApplicationContext

broken 发表于 2011-9-1 11:58 | 显示全部楼层
一目了然, 不错!

天上智喜 发表于 2011-9-1 11:58 | 显示全部楼层
说实话  spring这么搞 不只是他设计上的高明,商业上也是很高明的

hxy 发表于 2011-9-1 11:58 | 显示全部楼层
tterry 写道
说实话  spring这么搞 不只是他设计上的高明,商业上也是很高明的

什么叫:商业上也是很高明

怎么个高明法。

找不到我 发表于 2011-9-1 11:58 | 显示全部楼层
这个是类层次结构图吧,能把时序图画出来更好

楠楠 发表于 2011-9-1 11:58 | 显示全部楼层
请问下 这个图是用什么工具画的啊?

愚人 发表于 2011-9-1 11:58 | 显示全部楼层
zwt2001267 写道
这个是类层次结构图吧,能把时序图画出来更好


嗯 在学习中,后续会更新

feiguo 发表于 2011-9-1 11:58 | 显示全部楼层
ramus 写道
请问下 这个图是用什么工具画的啊?


楚凡 UML的工具

爱车车 发表于 2011-9-1 11:59 | 显示全部楼层
不错 !很清楚。
您需要登录后才可以回帖 登录 | 成为会员

本版积分规则

QQ|手机版|小黑屋|网站帮助|职业IT人-IT人生活圈 ( 粤ICP备12053935号-1 )|网站地图
本站文章版权归原发布者及原出处所有。内容为作者个人观点,并不代表本站赞同其观点和对其真实性负责,本站只提供参考并不构成任何投资及应用建议。本站是信息平台,网站上部分文章为转载,并不用于任何商业目的,我们已经尽可能的对作者和来源进行了通告,但是能力有限或疏忽造成漏登,请及时联系我们,我们将根据著作权人的要求立即更正或者删除有关内容。

GMT+8, 2024-5-5 20:01 , Processed in 0.135735 second(s), 20 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表