From 304b8a6e76041768c1e3776128be24ffe55bd69f Mon Sep 17 00:00:00 2001 From: Ben Klein Date: Thu, 30 Jul 2015 16:10:18 -0500 Subject: [PATCH] Sync docs from master to gh-pages --- spring-cloud-connectors.html | 74 ++++++++++++++++++++++-------------- 1 file changed, 45 insertions(+), 29 deletions(-) diff --git a/spring-cloud-connectors.html b/spring-cloud-connectors.html index de01728..69fbdca 100644 --- a/spring-cloud-connectors.html +++ b/spring-cloud-connectors.html @@ -508,7 +508,7 @@ table.CodeRay td.code>pre{padding:0}
-

Spring Cloud Connectors provides a simple abstraction for JVM-based applications running on cloud platforms to discover bound services and deployment information at runtime and provides support for registering discovered services as Spring beans. It is based on a plugin model so that the identical compiled application can be deployed locally or on multiple clouds, and it supports custom service definitions through Java SPI.

+

Spring Cloud Connectors provides a simple abstraction for JVM-based applications running on cloud platforms to discover bound services and deployment information at runtime, and provides support for registering discovered services as Spring beans. It is based on a plugin model so that the identical compiled application can be deployed locally or on any of multiple cloud platforms, and it supports custom service definitions through Java SPI.

Spring Cloud Connectors provides out-of-the-box support for discovering common services on Heroku and Cloud Foundry clouds as well as a properties-based configuration for development and testing.

@@ -567,74 +567,90 @@ table.CodeRay td.code>pre{padding:0}

Getting Started

-

The following examples are written for Maven; simply include the appropriate dependencies for your build system.

+

See below for examples of how to include the appropriate dependencies for your build system.

Including cloud connectors

Include the connector for each cloud platform you want to be discoverable. Including multiple connectors is perfectly fine; each connector will determine whether it should be active in a particular environment.

+
+

In Maven, replacing ${VERSION} with the desired artifact version:

+
<!-- to use Spring Cloud Connectors for development -->
 <dependency>
     <groupId>org.springframework.cloud</groupId>
     <artifactId>spring-cloud-localconfig-connector</artifactId>
-    <version>1.1.1.RELEASE</version>
+    <version>${VERSION}</version>
 </dependency>
 
 <!-- If you intend to deploy the app to Cloud Foundry -->
 <dependency>
     <groupId>org.springframework.cloud</groupId>
     <artifactId>spring-cloud-cloudfoundry-connector</artifactId>
-    <version>1.1.1.RELEASE</version>
+    <version>${VERSION}</version>
 </dependency>
 
 <!-- If you intend to deploy the app to Heroku -->
 <dependency>
   <groupId>org.springframework.cloud</groupId>
   <artifactId>spring-cloud-heroku-connector</artifactId>
-  <version>1.1.1.RELEASE</version>
+  <version>${VERSION}</version>
 </dependency>
+
+

In Gradle, replacing ${VERSION} with the desired version:

+
+
+
+
dependencies {
+
+    // to use Spring Cloud Connectors for development
+    compile 'org.springframework.cloud:spring-cloud-localconfig-connector:${VERSION}'
+
+    // If you intend to deploy the app to Cloud Foundry
+    compile 'org.springframework.cloud:spring-cloud-cloudfoundry-connector:${VERSION}'
+
+    // If you intend to deploy the app to Heroku
+    compile 'org.springframework.cloud:spring-cloud-heroku-connector:${VERSION}'
+
+}
+
+

Spring applications

-

Add the spring-service-connector in addition to your cloud connectors:

+

If you’re writing a Spring application, include the spring-service-connector in addition to your cloud connectors.

+
+
+

In Maven:

<dependency>
   <groupId>org.springframework.cloud</groupId>
   <artifactId>spring-cloud-spring-service-connector</artifactId>
-  <version>1.1.1.RELEASE</version>
-</dependency>
-
-<!-- to use Spring Cloud for development -->
-<dependency>
-    <groupId>org.springframework.cloud</groupId>
-    <artifactId>spring-cloud-localconfig-connector</artifactId>
-    <version>1.1.1.RELEASE</version>
-</dependency>
-
-<!-- If you intend to deploy the app to Cloud Foundry -->
-<dependency>
-    <groupId>org.springframework.cloud</groupId>
-    <artifactId>spring-cloud-cloudfoundry-connector</artifactId>
-    <version>1.1.1.RELEASE</version>
-</dependency>
-
-<!-- If you intend to deploy the app to Heroku -->
-<dependency>
-  <groupId>org.springframework.cloud</groupId>
-  <artifactId>spring-cloud-heroku-connector</artifactId>
-  <version>1.1.1.RELEASE</version>
+  <version>${VERSION}</version>
 </dependency>
+

In Gradle:

+
+
+
+
dependencies {
+
+    compile 'org.springframework.cloud:spring-cloud-spring-service-connector:${VERSION}'
+
+}
+
+
+

Then follow the instructions on Spring configuration using Java configuration or the <cloud> namespace.

@@ -652,7 +668,7 @@ table.CodeRay td.code>pre{padding:0}