Class PropertySourcesUtils

java.lang.Object
org.apache.dubbo.config.spring.util.PropertySourcesUtils

public abstract class PropertySourcesUtils extends Object
PropertySources Utilities
See Also:
  • PropertySources
  • Constructor Details

    • PropertySourcesUtils

      public PropertySourcesUtils()
  • Method Details

    • getSubProperties

      public static Map<String,Object> getSubProperties(Iterable<org.springframework.core.env.PropertySource<?>> propertySources, String prefix)
      Get Sub Properties
      Parameters:
      propertySources - PropertySource Iterable
      prefix - 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 Sub Properties
      Parameters:
      environment - ConfigurableEnvironment
      prefix - the prefix of property name
      Returns:
      Map
      See Also:
    • normalizePrefix

      public static String normalizePrefix(String prefix)
      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 prefixed Properties
      Parameters:
      propertySources - PropertySources
      prefix - 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 prefixed Properties
      Parameters:
      propertySources - PropertySources
      propertyResolver - PropertyResolver to resolve the placeholder if present
      prefix - the prefix of property name
      Returns:
      Map
      See Also:
    • getPropertyNames

      public static String[] getPropertyNames(org.springframework.core.env.PropertySource propertySource)
      Get the property names as the array from the specified PropertySource instance.
      Parameters:
      propertySource - PropertySource instance
      Returns:
      non-null