diff --git a/spring-cloud-core/src/main/java/org/springframework/cloud/Cloud.java b/spring-cloud-core/src/main/java/org/springframework/cloud/Cloud.java index 2d5804d..26cbe6b 100644 --- a/spring-cloud-core/src/main/java/org/springframework/cloud/Cloud.java +++ b/spring-cloud-core/src/main/java/org/springframework/cloud/Cloud.java @@ -201,9 +201,11 @@ public class Cloud { * * *
- * If a there is only a single service of a given type, that service is aliased to the service type. Keys for such properties
- * start in cloud.services.<service-type>. For example, if there is only a single MySQL service bound to the
- * application, the service properties will also be exposed starting with 'cloud.services.mysql' key:
+ * If a there is only a single service of a given type (as defined by the {@link ServiceInfo.ServiceLabel}
+ * annoation's value of the corresponding {@link ServiceInfo} class), that service is aliased
+ * to the service type. Keys for such properties start in cloud.services.<service-type>.
+ * For example, if there is only a single MySQL service bound to the application, the service properties
+ * will also be exposed starting with 'cloud.services.mysql' key:
* cloud.services.mysql.type = mysql-5.1
* cloud.services.mysql.plan = free
* cloud.services.mysql.connection.hostname = ...
diff --git a/spring-cloud-core/src/main/java/org/springframework/cloud/service/ServiceInfo.java b/spring-cloud-core/src/main/java/org/springframework/cloud/service/ServiceInfo.java
index c3f64c1..baebd47 100644
--- a/spring-cloud-core/src/main/java/org/springframework/cloud/service/ServiceInfo.java
+++ b/spring-cloud-core/src/main/java/org/springframework/cloud/service/ServiceInfo.java
@@ -19,6 +19,12 @@ public interface ServiceInfo {
/**
* Annotation to mark service label (used in presenting properties)
+ *
+ *
+ * If a {@link ServiceInfo} class carries this annotation, it is used categorize
+ * similar services together for the purpose of exposing cloud properties.
+ *
+ *
* @see Cloud#getCloudProperties()
*/
@Inherited