Spring--ApplicationContext
2015-10-31 11:30
357 查看
//中心接口,给应用提供配置信息 public interface ApplicationContext extends EnvironmentCapable, ListableBeanFactory, HierarchicalBeanFactory, MessageSource, ApplicationEventPublisher, ResourcePatternResolver { /** * Return the unique id of this application context. * @return the unique id of the context, or {@code null} if none */ //应用上下文唯一的id String getId(); /** * Return a name for the deployed application that this context belongs to. * @return a name for the deployed application, or the empty String by default */ //获得部署应用的name String getApplicationName(); /** * Return a friendly name for this context. * @return a display name for this context (never {@code null}) */ //这个上下文的外在name String getDisplayName(); /** * Return the timestamp when this context was first loaded. * @return the timestamp (ms) when this context was first loaded */ //第一次被加载的时间戳 long getStartupDate(); /** * Return the parent context, or {@code null} if there is no parent * and this is the root of the context hierarchy. * @return the parent context, or {@code null} if there is no parent */ //获得父亲上下文,没有父亲返回null ApplicationContext getParent(); /** * Expose AutowireCapableBeanFactory functionality for this context. * <p>This is not typically used by application code, except for the purpose of * initializing bean instances that live outside of the application context, * applying the Spring bean lifecycle (fully or partly) to them. * <p>Alternatively, the internal BeanFactory exposed by the * {@link ConfigurableApplicationContext} interface offers access to the * {@link AutowireCapableBeanFactory} interface too. The present method mainly * serves as a convenient, specific facility on the ApplicationContext interface. * <p><b>NOTE: As of 4.2, this method will consistently throw IllegalStateException * after the application context has been closed.</b> In current Spring Framework * versions, only refreshable application contexts behave that way; as of 4.2, * all application context implementations will be required to comply. * @return the AutowireCapableBeanFactory for this context * @throws IllegalStateException if the context does not support the * {@link AutowireCapableBeanFactory} interface, or does not hold an * autowire-capable bean factory yet (e.g. if {@code refresh()} has * never been called), or if the context has been closed already * @see ConfigurableApplicationContext#refresh() * @see ConfigurableApplicationContext#getBeanFactory() */ AutowireCapableBeanFactory getAutowireCapableBeanFactory() throws IllegalStateException; }
相关文章推荐
- Spring--FileSystemXmlApplicationContext
- Spring--ClassPathXmlApplicationContext
- Spring--ApplicationContext
- Spring--FileSystemXmlApplicationContext
- Spring--ClassPathXmlApplicationContext
- android用NDK编译出so最简单的方法
- iOS HmacSHA1加密 和 MD5 Base64加密 --iOS开发系列---项目中成长的知识五
- iOS 8 Auto Layout界面自动布局系列5-自身内容尺寸约束、修改约束、布局动画
- iOS 8 Auto Layout界面自动布局系列4-使用VFL添加布局约束
- iOS 8 Auto Layout界面自动布局系列3-使用代码添加布局约束
- iOS线程报错
- DSP BIOS
- Android APP常见首页效果的实现
- Android(7)ImageView:ScaleType属性(.FIT_CENTER/.FIT_START/.FIT_END/.CENTER./.CENTER_INSIDE/.CENTER_CR)
- Android工程师必备的网址
- Android 开发基础系列——在哪里选择Android设备
- 【Cocos2dx】利用导演类、场景类完成重新开始游戏、暂停游戏、关闭游戏功能
- cocos2dx一路走来之<window下打包apk>
- 微信如何突破支付宝的封锁
- iClap分享:如何优雅的在 APP 中实现测试?