类 PropertySourceUtils
- java.lang.Object
- org.springframework.boot.bind.PropertySourceUtils
public abstract class PropertySourceUtils extends Object
Convenience class for manipulating PropertySources.- 另请参阅:
PropertySource
,PropertySources
构造器概要
构造器 构造器 说明 PropertySourceUtils()
方法概要
所有方法 静态方法 具体方法 修饰符和类型 方法 说明 static Map<String,Object>
getSubProperties(org.springframework.core.env.PropertySources propertySources, String keyPrefix)
Return a Map of all values from the specifiedPropertySources
that start with a particular key.static Map<String,Object>
getSubProperties(org.springframework.core.env.PropertySources propertySources, String rootPrefix, String keyPrefix)
Return a Map of all values from the specifiedPropertySources
that start with a particular key.
构造器详细资料
PropertySourceUtils
public PropertySourceUtils()
方法详细资料
getSubProperties
public static Map<String,Object> getSubProperties(org.springframework.core.env.PropertySources propertySources, String keyPrefix)
Return a Map of all values from the specifiedPropertySources
that start with a particular key.- 参数:
propertySources
- the property sources to scankeyPrefix
- the key prefixes to test- 返回:
- a map of all sub properties starting with the specified key prefixes.
- 另请参阅:
getSubProperties(PropertySources, String, String)
getSubProperties
public static Map<String,Object> getSubProperties(org.springframework.core.env.PropertySources propertySources, String rootPrefix, String keyPrefix)
Return a Map of all values from the specifiedPropertySources
that start with a particular key.- 参数:
propertySources
- the property sources to scanrootPrefix
- a root prefix to be prepended to the keyPrefix (can benull
)keyPrefix
- the key prefixes to test- 返回:
- a map of all sub properties starting with the specified key prefixes.
- 另请参阅:
getSubProperties(PropertySources, String, String)