public interface Environment
| 限定符和类型 | 方法和说明 |
|---|---|
boolean |
acceptsProfiles(java.lang.String... profiles)
If active profiles is empty return false.
|
boolean |
containsProperty(java.lang.String key)
Return whether the given property key is available for resolution
|
java.lang.String[] |
getActiveProfiles()
Return the set of profiles explicitly made active for this environment.
|
BeanDefinitionLoader |
getBeanDefinitionLoader()
Get bean definition loader
|
BeanDefinitionRegistry |
getBeanDefinitionRegistry()
Get the bean definition registry
|
BeanNameCreator |
getBeanNameCreator()
Get a bean name creator
|
java.util.Properties |
getProperties()
Get properties
|
java.lang.String |
getProperty(java.lang.String key)
Return the property value associated with the given key, or
null if
the key cannot be resolved. |
<T> T |
getProperty(java.lang.String key,
java.lang.Class<T> targetType)
Return the property value associated with the given key, or
null if
the key cannot be resolved. |
java.lang.String |
getProperty(java.lang.String key,
java.lang.String defaultValue)
Return the property value associated with the given key, or
defaultValue if the key cannot be resolved. |
java.util.Properties getProperties()
boolean containsProperty(java.lang.String key)
key - keyjava.lang.String getProperty(java.lang.String key)
null if
the key cannot be resolved.key - the property name to resolvejava.lang.String getProperty(java.lang.String key,
java.lang.String defaultValue)
defaultValue if the key cannot be resolved.key - the property name to resolvedefaultValue - the default value to return if no value is founddefaultValue if the key cannot be resolved.<T> T getProperty(java.lang.String key,
java.lang.Class<T> targetType)
null if
the key cannot be resolved.key - the property name to resolvetargetType - the expected type of the property valuenull if
the key cannot be resolvedjava.lang.String[] getActiveProfiles()
boolean acceptsProfiles(java.lang.String... profiles)
profiles - profilesBeanNameCreator getBeanNameCreator()
BeanNameCreatorBeanDefinitionLoader getBeanDefinitionLoader()
BeanDefinitionRegistry getBeanDefinitionRegistry()
Copyright © 2019 TODAY. All rights reserved.