gboat2.base.core.util
类 SpringContextUtil
java.lang.Object
gboat2.base.core.util.SpringContextUtil
- 所有已实现的接口:
- EventListener, org.osgi.framework.BundleListener, org.springframework.beans.factory.Aware, org.springframework.context.ApplicationContextAware
public final class SpringContextUtil
- extends Object
- implements org.springframework.context.ApplicationContextAware, org.osgi.framework.BundleListener
Spring的Context操作辅助类
在spring的xml中如下配置:
- 作者:
- lysming
从类 java.lang.Object 继承的方法 |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
getInstance
public static SpringContextUtil getInstance()
setApplicationContext
public final void setApplicationContext(org.springframework.context.ApplicationContext context)
- 指定者:
- 接口
org.springframework.context.ApplicationContextAware
中的 setApplicationContext
getBeansOfType
public List<Object> getBeansOfType(Class<?> className,
org.osgi.framework.Bundle bundle)
- 获取指定bundle内的beans
- 参数:
className
- 类名称或接口名称bundle
- 查找的bundle
- 返回:
- 根据接口获得实现类
getBeanOfType
public Object getBeanOfType(Class<?> className,
org.osgi.framework.Bundle bundle)
getBeanOfId
public Object getBeanOfId(String id)
getBeanOfId
public Object getBeanOfId(String id,
org.osgi.framework.Bundle bundle)
getBeanOfId
public <T> T getBeanOfId(String id,
org.osgi.framework.Bundle bundle,
Class<T> requiredType)
bundleChanged
public void bundleChanged(org.osgi.framework.BundleEvent event)
- 指定者:
- 接口
org.osgi.framework.BundleListener
中的 bundleChanged
Copyright © 2014 广联达软件股份有限公司(Glodon Software Co., Ltd.). All rights reserved.