类 AbstractPropertySourceUtils
java.lang.Object
tech.mhuang.pacebox.springboot.core.spring.properties.AbstractPropertySourceUtils
Convenience class for manipulating PropertySources.
- 作者:
- Dave Syer
- 另请参阅:
-
PropertySourcePropertySources
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明getSubProperties(org.springframework.core.env.PropertySources propertySources, String keyPrefix) Return a Map of all values from the specifiedPropertySourcesthat start with a particular key.getSubProperties(org.springframework.core.env.PropertySources propertySources, String rootPrefix, String keyPrefix) Return a Map of all values from the specifiedPropertySourcesthat start with a particular key.
-
构造器详细资料
-
AbstractPropertySourceUtils
public AbstractPropertySourceUtils()
-
-
方法详细资料
-
getSubProperties
public static Map<String,Object> getSubProperties(org.springframework.core.env.PropertySources propertySources, String keyPrefix) Return a Map of all values from the specifiedPropertySourcesthat 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
public static Map<String,Object> getSubProperties(org.springframework.core.env.PropertySources propertySources, String rootPrefix, String keyPrefix) Return a Map of all values from the specifiedPropertySourcesthat 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.
- 另请参阅:
-