雪花算法 YES/NO
This commit is contained in:
@@ -23,6 +23,11 @@ public class SpringContextUtils implements ApplicationContextAware {
|
||||
return applicationContext.getBean(name);
|
||||
}
|
||||
|
||||
public static Object getSpringBean(Class<?> clazz) {
|
||||
return applicationContext == null ? null : applicationContext.getBean(clazz);
|
||||
}
|
||||
|
||||
|
||||
public static <T> T getBean(String name, Class<T> requiredType) {
|
||||
return applicationContext.getBean(name, requiredType);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user