类 AbstractPropertySourceUtils

java.lang.Object
tech.mhuang.pacebox.springboot.core.spring.properties.AbstractPropertySourceUtils

public abstract class AbstractPropertySourceUtils extends Object
Convenience class for manipulating PropertySources.
作者:
Dave Syer
另请参阅:
  • PropertySource
  • PropertySources
  • 构造器详细资料

    • 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 specified PropertySources that start with a particular key.
      参数:
      propertySources - the property sources to scan
      keyPrefix - 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 specified PropertySources that start with a particular key.
      参数:
      propertySources - the property sources to scan
      rootPrefix - a root prefix to be prepended to the keyPrefix (can be null)
      keyPrefix - the key prefixes to test
      返回:
      a map of all sub properties starting with the specified key prefixes.
      另请参阅: