| Modifier and Type | Field and Description |
|---|---|
protected static org.slf4j.Logger |
LOGGER |
| Constructor and Description |
|---|
SpringRegistry() |
| Modifier and Type | Method and Description |
|---|---|
<T> List<T> |
findByType(Class<T> type,
boolean newInstance)
查找Bean
|
<T> Map<String,T> |
findByTypeWithName(Class<T> type)
调用Spring工具类获取bean
|
<T> T |
getFirstByType(Class<T> type,
boolean newInstance)
查找Bean
|
<T> T |
getFirstByType(Class<T> type,
boolean newInstance,
boolean withProxy)
查找Bean, 是否找proxy
|
protected <T> T |
getTargetObject(Object proxy,
Class<T> targetClass) |
void |
setApplicationContext(org.springframework.context.ApplicationContext applicationContext) |
public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
throws org.springframework.beans.BeansException
setApplicationContext in interface org.springframework.context.ApplicationContextAwareorg.springframework.beans.BeansExceptionpublic <T> List<T> findByType(Class<T> type, boolean newInstance)
RegistryfindByType in interface Registrytype - 类型public <T> T getFirstByType(Class<T> type, boolean newInstance)
RegistrygetFirstByType in interface Registrytype - 类型public <T> T getFirstByType(Class<T> type, boolean newInstance, boolean withProxy)
RegistrygetFirstByType in interface Registrytype - 类型public <T> Map<String,T> findByTypeWithName(Class<T> type)
type - 类类型Copyright © 2015–2016 Baidu. All rights reserved.