image:https://api.travis-ci.org/spring-projects/spring-boot-data-geode.svg?branch=master["Build Status", link="https://travis-ci.org/spring-projects/spring-boot-data-geode"]

[[about]]
== Spring Boot for Apache Geode & Pivotal GemFire

_Spring Boot for Apache Geode & Pivotal GemFire_ extends https://projects.spring.io/spring-boot/[_Spring Boot_] with
_auto-configuration_ support as well as other _convention or configuration_ features to simplify the development
of _Spring_ applications using either https://geode.apache.org/[Apache Geode] or https://pivotal.io/pivotal-gemfire[Pivotal GemFire]
in a _Spring_ context.

This project builds on both https://github.com/spring-projects/spring-data-geode[_Spring Data for Apache Geode_]
and https://projects.spring.io/spring-data-gemfire/[_Spring Data for Pivotal GemFire_]
as well as https://spring.io/projects/spring-boot[Spring Boot].

[[project-goals]]
=== Project Goals

This project adds _Spring Boot_ **auto-configuration** support for both https://geode.apache.org/[Apache Geode]
and https://pivotal.io/pivotal-gemfire[Pivotal GemFire].

Among other things, this project builds on https://projects.spring.io/spring-boot/[_Spring Boot_]
as well as https://projects.spring.io/spring-data-gemfire/[_Spring Data for Apache Geode & Pivotal GemFire_]
and additionally offers...

1. _Auto-configures_ an _Apache Geode_ or _Pivotal GemFire_ (PCC)
https://geode.apache.org/releases/latest/javadoc/org/apache/geode/cache/client/ClientCache.html[ClientCache]
instance automatically when either _Spring Data for Apache Geode_ or _Spring Data for Pivotal GemFire_
are on the application's CLASSPATH.

2. _Auto-configures_ either _Apache Geode_ or _Pivotal GemFire_ (PCC) as a _caching provider_ in
https://docs.spring.io/spring/docs/current/spring-framework-reference/htmlsingle/#cache[_Spring's Cache Abstraction_]
when either _Spring Data for Apache Geode_ or _Spring Data for Pivotal GemFire_ are on the application's CLASSPATH.

3. _Auto-configures_ _Spring Data for Apache Geode_ or _Spring Data for Pivotal GemFire_
https://docs.spring.io/spring-data-gemfire/docs/current/reference/html/#gemfire-repositories[Repositories]
when _Spring Data for Apache Geode_ or _Spring Data for Pivotal GemFire_ are on the application's CLASSPATH
and _Spring Boot_ detects SDG _Repositories_ in your _Spring Boot_ application.

4. Provides additional support for _Spring Boot_/_Spring Data for Apache Geode_/_Pivotal GemFire_ applications
deployed to PCF using Pivotal Cloud Cache (PCC).  Additionally, if your application requires (HTTP) Session State
Caching services, you can also take advantage of
https://github.com/spring-projects/spring-session-data-geode[_Spring Session for Apache Geode/Pivotal GemFire_].

This, along with many other benefits, are provided by this project.

[[documentation]]
=== Documentation

.Example Apache Geode Applications using Spring Boot
|===
| Version | Reference Documentation | Javadoc | Samples

| `current` | https://docs.spring.io/spring-boot-data-geode-build/current/reference/html5/[Ref Docs] | https://docs.spring.io/spring-boot-data-geode-build/current/api/[Javadoc] | https://docs.spring.io/spring-boot-data-geode-build/current/reference/html5/#geode-samples[Samples]
| `1.0.1.RELEASE` | https://docs.spring.io/spring-boot-data-geode-build/1.0.x/reference/html5/[Ref Docs] | https://docs.spring.io/spring-boot-data-geode-build/1.0.x/api/[Javadoc] | https://docs.spring.io/spring-boot-data-geode-build/1.0.x/reference/html5/#geode-samples[Samples]
| `1.0.2.BUILD-SNAPSHOT`| https://docs.spring.io/spring-boot-data-geode-build/1.0.x-SNAPSHOT/reference/html5/[Ref Docs] | https://docs.spring.io/spring-boot-data-geode-build/1.0.x-SNAPSHOT/api/[Javadoc] | https://docs.spring.io/spring-boot-data-geode-build/1.0.x-SNAPSHOT/reference/html5/#geode-samples[Samples]
| `1.1.6.RELEASE` | https://docs.spring.io/spring-boot-data-geode-build/1.1.x/reference/html5/[Ref Docs] | https://docs.spring.io/spring-boot-data-geode-build/1.1.x/api/[Javadoc] | https://docs.spring.io/spring-boot-data-geode-build/1.1.x/reference/html5/#geode-samples[Samples]
| `1.1.7.BUILD-SNAPSHOT`| https://docs.spring.io/spring-boot-data-geode-build/1.1.x-SNAPSHOT/reference/html5/[Ref Docs] | https://docs.spring.io/spring-boot-data-geode-build/1.1.x-SNAPSHOT/api/[Javadoc] | https://docs.spring.io/spring-boot-data-geode-build/1.1.x-SNAPSHOT/reference/html5/#geode-samples[Samples]
| `1.2.6.RELEASE`| https://docs.spring.io/spring-boot-data-geode-build/1.2.x/reference/html5/[Ref Docs] | https://docs.spring.io/spring-boot-data-geode-build/1.2.x/api/[Javadoc] | https://docs.spring.io/spring-boot-data-geode-build/1.2.x/reference/html5/#geode-samples[Samples]
| `1.2.7.BUILD-SNAPSHOT`| https://docs.spring.io/spring-boot-data-geode-build/1.2.x-SNAPSHOT/reference/html5/[Ref Docs] | https://docs.spring.io/spring-boot-data-geode-build/1.2.x-SNAPSHOT/api/[Javadoc] | https://docs.spring.io/spring-boot-data-geode-build/1.2.x-SNAPSHOT/reference/html5/#geode-samples[Samples]
| `1.3.0.M3`| https://docs.spring.io/spring-boot-data-geode-build/1.3.x/reference/html5/[Ref Docs] | https://docs.spring.io/spring-boot-data-geode-build/1.3.x/api/[Javadoc] | https://docs.spring.io/spring-boot-data-geode-build/1.3.x/reference/html5/#geode-samples[Samples]
| `1.3.0.BUILD-SNAPSHOT`| https://docs.spring.io/spring-boot-data-geode-build/1.3.x-SNAPSHOT/reference/html5/[Ref Docs] | https://docs.spring.io/spring-boot-data-geode-build/1.3.x-SNAPSHOT/api/[Javadoc] | https://docs.spring.io/spring-boot-data-geode-build/1.3.x-SNAPSHOT/reference/html5/#geode-samples[Samples]

|===

[[examples]]
=== Examples

The single, most relevant "_source of truth_" on how to get started quickly and effectively, using Spring Boot
for Apache Geode & Pivotal GemFire (SBDG) to solve problems, is to start with the
https://docs.spring.io/spring-boot-data-geode-build/current/reference/html5/#geode-samples[Samples].
There, you will find different examples with documentation and code showing you how to use SBDG to appropriately
handle specific application concerns, like Caching.

You can find an example of using SBDG in the Pivotal Cloud Cache (PCC) https://github.com/pivotal-cf/PCC-Sample-App-PizzaStore[Pizza Store]
GitHub repository, which is a Spring Boot, Pivotal GemFire `ClientCache` application that connects to PCC when the app
is deployed to PCF.

The https://github.com/jxblum/contacts-application/tree/master/boot-example[boot-example] found in the
_Contacts Application Reference Implementation_ for _Spring Data for Apache Geode & Pivotal GemFire_ (SDG) uses SBDG
to manage Books in a _System of Record_ Use Case.

Then, there is a series of examples that walks a user through a series of steps starting by building a simple,
Spring Boot client application using the Apache Geode API only.  Next, the app is rebuilt using Spring Data
for Apache Geode (SDG) to show the simplifications that SDG affords you as a developer.  Finally, the app is rebuilt
once more using SBDG to demonstrate the power of Apache Geode when combined with Spring Boot.  The example can be found
in the https://github.com/kohlmu-pivotal/PCCDemo[PCCDemo] GitHub repository.  Each app can be deployed to PCF
and bound to a Pivotal Cloud Cache service instance.  With SBDG, little to no code or configuration changes are
necessary to run the app locally and then later deploy the same app to a managed environment like PCF.  It just works!

Finally, the https://github.com/jxblum/temperature-service/tree/using-spring-boot[Temperature Service] example is
an _Internet of Things_ (IoT) and _Event Stream Processing_ (ESP) Use Case that manages Temperature Sensors and Monitors
and uses SBDG to make the application configuration and implementation as simple as can be.

Overtime, we will be adding even more relevant and practical examples, so please keep checking back.

[[spring-boot-project-site]]
== Spring Boot Project Site

You can find the documentation, issue management, support, samples, and guides for using _Spring Boot_
at https://projects.spring.io/spring-boot/

[[code-of-conduct]]
== Code of Conduct

This project adheres to the Contributor Covenant link:CODE_OF_CONDUCT.adoc[code of conduct].
By participating, you  are expected to uphold this code. Please report unacceptable behavior to spring-code-of-conduct@pivotal.io.

[[license]]
== License

_Spring Boot_, _Spring Boot for Apache Geode_ and _Spring Boot for Pivotal GemFire_ is Open Source Software
released under the https://www.apache.org/licenses/LICENSE-2.0.html[Apache 2.0 license].
