Class IdUtils
java.lang.Object
org.springframework.cloud.commons.util.IdUtils
- Author:
- Spencer Gibb
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
combineParts
(String firstPart, String separator, String secondPart) static String
getDefaultInstanceId
(org.springframework.core.env.PropertyResolver resolver) static String
getDefaultInstanceId
(org.springframework.core.env.PropertyResolver resolver, boolean includeHostname) static String
getResolvedServiceId
(org.springframework.core.env.PropertyResolver resolver) Gets the resolved service id.static String
Gets the unresolved template for the service id without active profiles.static String
Gets 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
-