java.lang.Object
org.springframework.cloud.kubernetes.commons.config.ConfigUtils

public final class ConfigUtils extends Object
Utility class that works with configuration properties.
Author:
Ioannis Canellos
  • Method Details

    • getApplicationName

      public static String getApplicationName(org.springframework.core.env.Environment env, String configName, String configurationTarget)
    • findPrefix

      public static String findPrefix(String explicitPrefix, Boolean useNameAsPrefix, boolean defaultUseNameAsPrefix, String normalizedName)
      Parameters:
      explicitPrefix - value of 'spring.cloud.kubernetes.config.sources.explicitPrefix'
      useNameAsPrefix - value of 'spring.cloud.kubernetes.config.sources.useNameAsPrefix'
      defaultUseNameAsPrefix - value of 'spring.cloud.kubernetes.config.defaultUseNameAsPrefix'
      normalizedName - either the name of 'spring.cloud.kubernetes.config.sources.name' or 'spring.cloud.kubernetes.config.name'
      Returns:
      prefix to use in normalized sources, never null
    • includeProfileSpecificSources

      public static boolean includeProfileSpecificSources(boolean defaultIncludeProfileSpecificSources, Boolean includeProfileSpecificSources)
      Parameters:
      defaultIncludeProfileSpecificSources - value of 'spring.cloud.kubernetes.config.includeProfileSpecificSources'
      includeProfileSpecificSources - value of 'spring.cloud.kubernetes.config.sources.includeProfileSpecificSources'
      Returns:
      useProfileNameAsPrefix to be used in normalized sources