类 PropertySourcesUtils
java.lang.Object
com.alibaba.cloud.commons.context.support.PropertySourcesUtils
-
字段概要
字段 -
方法概要
修饰符和类型方法说明static String[]getPropertyNames(org.springframework.core.env.PropertySource propertySource) Get the property names as the array from the specifiedPropertySourceinstance.getSubProperties(Iterable<org.springframework.core.env.PropertySource<?>> propertySources, String prefix) Get SubProperties.getSubProperties(org.springframework.core.env.ConfigurableEnvironment environment, String prefix) Get SubProperties.getSubProperties(org.springframework.core.env.PropertySources propertySources, String prefix) Get prefixedProperties.getSubProperties(org.springframework.core.env.PropertySources propertySources, org.springframework.core.env.PropertyResolver propertyResolver, String prefix) Get prefixedProperties.static StringnormalizePrefix(String prefix) Normalize the prefix.
-
字段详细资料
-
EMPTY_STRING_ARRAY
Empty String array.
-
-
方法详细资料
-
getSubProperties
public static Map<String,Object> getSubProperties(Iterable<org.springframework.core.env.PropertySource<?>> propertySources, String prefix) Get SubProperties.- 参数:
propertySources-PropertySourceIterable.prefix- the prefix of property name.- 返回:
- Map
- 另请参阅:
-
getSubProperties
public static Map<String,Object> getSubProperties(org.springframework.core.env.ConfigurableEnvironment environment, String prefix) Get SubProperties.- 参数:
environment-ConfigurableEnvironment.prefix- the prefix of property name.- 返回:
- Map
- 另请参阅:
-
normalizePrefix
Normalize the prefix.- 参数:
prefix- the prefix.- 返回:
- the prefix.
-
getSubProperties
public static Map<String,Object> getSubProperties(org.springframework.core.env.PropertySources propertySources, String prefix) Get prefixedProperties.- 参数:
propertySources-PropertySources.prefix- the prefix of property name.- 返回:
- Map
- 另请参阅:
-
getSubProperties
public static Map<String,Object> getSubProperties(org.springframework.core.env.PropertySources propertySources, org.springframework.core.env.PropertyResolver propertyResolver, String prefix) Get prefixedProperties.- 参数:
propertySources-PropertySources.propertyResolver-PropertyResolverto resolve the placeholder if present.prefix- the prefix of property name.- 返回:
- Map
- 另请参阅:
-
getPropertyNames
Get the property names as the array from the specifiedPropertySourceinstance.- 参数:
propertySource-PropertySourceinstance.- 返回:
- non-null
-