Class IdUtils
java.lang.Object
org.springframework.cloud.commons.util.IdUtils
- Author:
- Spencer Gibb
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic StringcombineParts(String firstPart, String separator, String secondPart) static StringgetDefaultInstanceId(org.springframework.core.env.PropertyResolver resolver) static StringgetDefaultInstanceId(org.springframework.core.env.PropertyResolver resolver, boolean includeHostname) static StringgetResolvedServiceId(org.springframework.core.env.PropertyResolver resolver) Gets the resolved service id.static StringGets the unresolved template for the service id without active profiles.static StringGets the unresolved template for the service id including active profiles.
-
Field Details
-
DEFAULT_SERVICE_ID_STRING
- See Also:
-
DEFAULT_SERVICE_ID_WITH_ACTIVE_PROFILES_STRING
- See Also:
-
-
Method Details
-
getDefaultInstanceId
-
getDefaultInstanceId
public static String getDefaultInstanceId(org.springframework.core.env.PropertyResolver resolver, boolean includeHostname) -
getResolvedServiceId
Gets the resolved service id.- Parameters:
resolver- A property resolved- Returns:
- A unique id that can be used to uniquely identify a service
-
getUnresolvedServiceId
Gets the unresolved template for the service id without active profiles.- Returns:
- The combination of properties to create a unique service id.
-
getUnresolvedServiceIdWithActiveProfiles
Gets the unresolved template for the service id including active profiles.- Returns:
- The combination of properties to create a unique service id.
-
combineParts
-