Spring Cloud

Spring Cloud simplifies connecting to services and gaining operating environment awareness in cloud platforms like Cloud Foundry and Heroku. Special support for Spring application through Java and XML config makes it trivial for apps to connect to cloud services. Designed for extensibility, you can use one of the existing cloud connectors (Cloud Foundry and Heroku) or write one for your cloud platform. While supporting commonly used services (relational databases, MongoDB, Redis, Rabbit) out of the box, it allows extending it to your own services. Neither of these require modifying Spring Cloud itself; all you need to do is add jars for your extensions to your classpath.

Quick Start
Fork me on GitHub

Spring Cloud uses the following main concepts:

  • Cloud Connector: An interface that a cloud provider can implement to allow the rest of the library to work with a cloud platform.
  • Service Connector: An object, such as javax.sql.DataSource, that represent a connection to a service.
  • Service information: Information about the underlying service such as host, port, and credentials.
  • Application information: Information about application and instance in which these libraries are embedded.

Features

Spring Cloud focuses on providing good out of box experience for typical use cases and extensibility mechanism to cover others. It feature two axis of extensibility:

  • Java and XML config for Spring Applications: Simple ways to create beans for services bound to the application.
  • Cloud Platform Extensibility: Through the concept of Cloud Connector, it allows extending Spring Cloud functionality to other cloud platforms.
  • Service Information and Connector Extensibility: Spring Cloud allows connecting to any kind of service as long as there is a way to extract its connection information from the application operating environment and (optionally) transform it into a service connector.

Constituent Projects

  • Spring Cloud Core: Core library that is cloud agnostic and Spring agnostic. Provides entry point for application developers that choose to programmatically access cloud services and application information. It also provides an extension mechanism to contribute cloud connectors and service connector creators.]
  • Spring Cloud Service Connector for Spring: Library that provides service connectors creators for javax.sql.DataSource and various connection factories spring-data projects.
  • Cloudfoundry Connector: Cloud connector for Cloud Foundry.
  • Heroku Connector: Cloud connector for Heroku.

Quick Start

Download

The recommended way to get started using spring-cloud in your project is with a dependency management system – the snippet below can be copied and pasted into your build. Need help? See our getting started guides on building with Maven and Gradle.

Then if you are working with a Spring application, follow instructions in Spring Cloud Service Connector for Spring. If you aren't using Spring, take a look at Spring Cloud Core.