public final class SpringUtil extends Object implements org.springframework.context.ApplicationContextAware, org.springframework.context.EnvironmentAware, org.springframework.context.ResourceLoaderAware
| Constructor and Description |
|---|
SpringUtil() |
| Modifier and Type | Method and Description |
|---|---|
static <T> T |
getBean(Class<T> clazz) |
static <T> T |
getBean(String name) |
static String |
getProperty(String key) |
static org.springframework.core.io.Resource |
getResource(String location) |
void |
setApplicationContext(org.springframework.context.ApplicationContext applicationContext) |
void |
setEnvironment(org.springframework.core.env.Environment environment) |
void |
setResourceLoader(org.springframework.core.io.ResourceLoader resourceLoader) |
public void setApplicationContext(@Nonnull org.springframework.context.ApplicationContext applicationContext) throws org.springframework.beans.BeansException
setApplicationContext in interface org.springframework.context.ApplicationContextAwareorg.springframework.beans.BeansExceptionpublic void setEnvironment(@Nonnull org.springframework.core.env.Environment environment)
setEnvironment in interface org.springframework.context.EnvironmentAwarepublic void setResourceLoader(@Nonnull org.springframework.core.io.ResourceLoader resourceLoader)
setResourceLoader in interface org.springframework.context.ResourceLoaderAwarepublic static <T> T getBean(Class<T> clazz)
public static <T> T getBean(String name)
public static org.springframework.core.io.Resource getResource(String location)
Copyright © 2017–2021. All rights reserved.