隨筆-295  評(píng)論-26  文章-1  trackbacks-0
          Bean factory implementations should support the standard bean lifecycle interfaces as far as possible. The full set of initialization methods and their standard order is:
          BeanFactory的實(shí)現(xiàn)應(yīng)該盡可能支持標(biāo)準(zhǔn)的bean生命周期,以下是所以的方法的順序的依次列表
          1. BeanNameAware's?? setBeanName
          2. BeanClassLoaderAware's? setBeanClassLoader
          3. BeanFactoryAware's?? setBeanFactory
          4. ResourceLoaderAware's setResourceLoader (only applicable when running in an application context)
          5. ApplicationEventPublisherAware's setApplicationEventPublisher (only applicable when running in an application context)
          6. MessageSourceAware's setMessageSource (only applicable when running in an application context)
          7. ApplicationContextAware's setApplicationContext (only applicable when running in an application context)
          8. ServletContextAware's setServletContext (only applicable when running in a web application context)
          9. postProcessBeforeInitialization methods of BeanPostProcessors
          10. InitializingBean's afterPropertiesSet
          11. a custom init-method definition
          12. postProcessAfterInitialization methods of BeanPostProcessors
          ?當(dāng)關(guān)閉一個(gè)bean的時(shí)候
          On shutdown of a bean factory, the following lifecycle methods apply:
          1. DisposableBean's destroy
          2. a custom destroy-method definition

          Method Summary
          ?booleancontainsBean(String?name)
          ??????????Does this bean factory contain a bean with the given name?
          ?String[]getAliases(String?name)
          ??????????Return the aliases for the given bean name, if any.
          ?ObjectgetBean(String?name)
          ??????????Return an instance, which may be shared or independent, of the specified bean.
          ?ObjectgetBean(String?name, Class?requiredType)
          ??????????Return an instance, which may be shared or independent, of the specified bean.
          ?ClassgetType(String?name)
          ??????????Determine the type of the bean with the given name.
          ?booleanisPrototype(String?name)
          ??????????Is this bean a prototype?
          ?booleanisSingleton(String?name)
          ??????????Is this bean a shared singleton?
          ?booleanisTypeMatch(String?name, Class?targetType)
          ??????????Check whether the bean with the given name matches the specified type.
          ?

          大盤預(yù)測 國富論
          posted on 2007-08-28 14:09 華夢(mèng)行 閱讀(566) 評(píng)論(0)  編輯  收藏 所屬分類: Spring
          主站蜘蛛池模板: 闵行区| 龙游县| 白玉县| 清远市| 昌都县| 从化市| 庐江县| 麻栗坡县| 临颍县| 弥渡县| 泸州市| 武邑县| 赤壁市| 密云县| 长宁区| 德化县| 永顺县| 田林县| 巫山县| 惠来县| 泌阳县| 通许县| 潍坊市| 巴彦县| 密山市| 米脂县| 衡山县| 大连市| 玉门市| 巨野县| 长岭县| 奎屯市| 荣成市| 托克逊县| 惠东县| 固原市| 金湖县| 资阳市| 巴马| 黄石市| 常宁市|