public class ApplicationContextHolder extends Object implements org.springframework.context.ApplicationContextAware
| 构造器和说明 |
|---|
ApplicationContextHolder() |
| 限定符和类型 | 方法和说明 |
|---|---|
static boolean |
containsBean(String name) |
static boolean |
containsBeanDefinition(String beanName) |
static boolean |
containsLocalBean(String name) |
static <A extends Annotation> |
findAnnotationOnBean(String beanName,
Class<A> annotationType) |
static String[] |
getAliases(String name) |
static String |
getApplicationName() |
static <T> T |
getBean(Class<T> requiredType) |
static <T> T |
getBean(Class<T> requiredType,
Object... args) |
static Object |
getBean(String name) |
static <T> T |
getBean(String name,
Class<T> requiredType) |
static Object |
getBean(String name,
Object... args) |
static int |
getBeanDefinitionCount() |
static String[] |
getBeanDefinitionNames() |
static String[] |
getBeanNamesForAnnotation(Class<? extends Annotation> annotationType) |
static String[] |
getBeanNamesForType(Class<?> type) |
static String[] |
getBeanNamesForType(Class<?> type,
boolean includeNonSingletons,
boolean allowEagerInit) |
static String[] |
getBeanNamesForType(org.springframework.core.ResolvableType type) |
static <T> Map<String,T> |
getBeansOfType(Class<T> type) |
static <T> Map<String,T> |
getBeansOfType(Class<T> type,
boolean includeNonSingletons,
boolean allowEagerInit) |
static Map<String,Object> |
getBeansWithAnnotation(Class<? extends Annotation> annotationType) |
static org.springframework.context.ApplicationContext |
getContext() |
static String |
getDisplayName() |
static org.springframework.core.env.Environment |
getEnvironment() |
static String |
getId() |
static org.springframework.core.io.Resource |
getResource(String location) |
static org.springframework.core.io.Resource[] |
getResources(String locationPattern) |
static long |
getStartupDate() |
static Class<?> |
getType(String name) |
static boolean |
isPrototype(String name) |
static boolean |
isSingleton(String name) |
static boolean |
isTypeMatch(String name,
Class<?> typeToMatch) |
static boolean |
isTypeMatch(String name,
org.springframework.core.ResolvableType typeToMatch) |
static void |
publishEvent(org.springframework.context.ApplicationEvent event) |
static void |
publishEvent(Object event) |
void |
setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
实现 ApplicationContextAware 接口的回调方法,设置上下文环境
|
public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
setApplicationContext 在接口中 org.springframework.context.ApplicationContextAwareapplicationContext - ApplicationContextpublic static org.springframework.context.ApplicationContext getContext()
public static <T> T getBean(Class<T> requiredType)
public static boolean containsBean(String name)
public static boolean isSingleton(String name)
public static boolean isPrototype(String name)
public static boolean isTypeMatch(String name, org.springframework.core.ResolvableType typeToMatch)
public static <T> Map<String,T> getBeansOfType(Class<T> type, boolean includeNonSingletons, boolean allowEagerInit)
public static Map<String,Object> getBeansWithAnnotation(Class<? extends Annotation> annotationType)
public static <A extends Annotation> A findAnnotationOnBean(String beanName, Class<A> annotationType)
public static String[] getBeanNamesForType(Class<?> type, boolean includeNonSingletons, boolean allowEagerInit)
public static String[] getBeanNamesForAnnotation(Class<? extends Annotation> annotationType)
public static boolean containsBeanDefinition(String beanName)
public static int getBeanDefinitionCount()
public static String[] getBeanDefinitionNames()
public static String[] getBeanNamesForType(org.springframework.core.ResolvableType type)
public static String getId()
public static String getApplicationName()
public static String getDisplayName()
public static long getStartupDate()
public static boolean containsLocalBean(String name)
public static void publishEvent(org.springframework.context.ApplicationEvent event)
public static void publishEvent(Object event)
public static org.springframework.core.env.Environment getEnvironment()
public static org.springframework.core.io.Resource[] getResources(String locationPattern) throws IOException
IOExceptionpublic static org.springframework.core.io.Resource getResource(String location)
Copyright © 2017–2018 trang. All rights reserved.