Spring Web 应用之Web ApplicationContext体系结构

Spring web的应用为XmlWebApplicationContext,它的主要功能是适应Web应用,如国际化资源加载,配置资源的读取,事件等。在其内部还才真正包含了一个核心的BeanFactory,可以说有闭月羞花之容,倾国倾城之貌。总之解释为“金屋藏娇”

Java代码   收藏代码
  1. public abstract class AbstractRefreshableApplicationContext extends AbstractApplicationContext {  
  2. //属性...  
  3. //其他方法...  
  4. /** 
  5.      * 为上下文创建一个内部BeanFactory工厂 
  6.      * Create an internal bean factory for this context. 
  7.      * Called for each {@link #refresh()} attempt. 
  8.      * <p>The default implementation creates a 
  9.      * {@link org.springframework.beans.factory.support.DefaultListableBeanFactory} 
  10.      * with the {@link #getInternalParentBeanFactory() internal bean factory} of this 
  11.      * context's parent as parent bean factory. Can be overridden in subclasses, 
  12.      * for example to customize DefaultListableBeanFactory's settings. 
  13.      * @return the bean factory for this context 
  14.      * @see org.springframework.beans.factory.support.DefaultListableBeanFactory#setAllowBeanDefinitionOverriding 
  15.      * @see org.springframework.beans.factory.support.DefaultListableBeanFactory#setAllowEagerClassLoading 
  16.      * @see org.springframework.beans.factory.support.DefaultListableBeanFactory#setAllowCircularReferences 
  17.      * @see org.springframework.beans.factory.support.DefaultListableBeanFactory#setAllowRawInjectionDespiteWrapping 
  18.      */  
  19.     protected DefaultListableBeanFactory createBeanFactory() {  
  20.         return new DefaultListableBeanFactory(getInternalParentBeanFactory());  
  21.     }  
  22. //其他方法...  
  23. }  

 DefaultListableBeanFactory 现在目睹阿娇之倾国倾城之容:

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值