Class PropertySourcesUtils
java.lang.Object
org.apache.dubbo.config.spring.util.PropertySourcesUtils
PropertySources Utilities- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic 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 SubPropertiesgetSubProperties(org.springframework.core.env.ConfigurableEnvironment environment, String prefix) Get SubPropertiesgetSubProperties(org.springframework.core.env.PropertySources propertySources, String prefix) Get prefixedPropertiesgetSubProperties(org.springframework.core.env.PropertySources propertySources, org.springframework.core.env.PropertyResolver propertyResolver, String prefix) Get prefixedPropertiesstatic StringnormalizePrefix(String prefix) Normalize the prefix
-
Constructor Details
-
PropertySourcesUtils
public PropertySourcesUtils()
-
-
Method Details
-
getSubProperties
public static Map<String,Object> getSubProperties(Iterable<org.springframework.core.env.PropertySource<?>> propertySources, String prefix) Get SubProperties- Parameters:
propertySources-PropertySourceIterableprefix- the prefix of property name- Returns:
- Map
- See Also:
-
getSubProperties
public static Map<String,Object> getSubProperties(org.springframework.core.env.ConfigurableEnvironment environment, String prefix) Get SubProperties- Parameters:
environment-ConfigurableEnvironmentprefix- the prefix of property name- Returns:
- Map
- See Also:
-
normalizePrefix
Normalize the prefix- Parameters:
prefix- the prefix- Returns:
- the prefix
-
getSubProperties
public static Map<String,Object> getSubProperties(org.springframework.core.env.PropertySources propertySources, String prefix) Get prefixedProperties- Parameters:
propertySources-PropertySourcesprefix- the prefix of property name- Returns:
- Map
- See Also:
-
getSubProperties
public static Map<String,Object> getSubProperties(org.springframework.core.env.PropertySources propertySources, org.springframework.core.env.PropertyResolver propertyResolver, String prefix) Get prefixedProperties- Parameters:
propertySources-PropertySourcespropertyResolver-PropertyResolverto resolve the placeholder if presentprefix- the prefix of property name- Returns:
- Map
- See Also:
-
getPropertyNames
Get the property names as the array from the specifiedPropertySourceinstance.- Parameters:
propertySource-PropertySourceinstance- Returns:
- non-null
-