Class ConfigUtils
java.lang.Object
org.springframework.cloud.kubernetes.commons.config.ConfigUtils
Utility class that works with configuration properties.
- Author:
- Ioannis Canellos
-
Method Summary
Modifier and TypeMethodDescriptionstatic StringfindPrefix(String explicitPrefix, Boolean useNameAsPrefix, boolean defaultUseNameAsPrefix, String normalizedName) static StringgetApplicationName(org.springframework.core.env.Environment env, String configName, String configurationTarget) static booleanincludeProfileSpecificSources(boolean defaultIncludeProfileSpecificSources, Boolean includeProfileSpecificSources)
-
Method Details
-
getApplicationName
-
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
-