public class SpringContext extends Object
| 限定符和类型 | 字段和说明 |
|---|---|
static org.springframework.context.ApplicationContext |
context |
| 构造器和说明 |
|---|
SpringContext() |
public static <T> T getBean(Class<T> clazz) throws Exception
clazz - Exceptionpublic static <T> T getBean(String className) throws Exception
T - target Class TypeclassName - className pattern classFullName[:beanId]Exceptionpublic static <T> T getBean(String className, ClassLoader classLoader) throws Exception
T - target Class TypeclassName - className pattern classFullName[:beanId]classLoader - target classLoaderExceptionpublic static void unlock()
public static void lock()
Copyright © 2021. All rights reserved.