No description, website, or topics provided.
HTML Java JavaScript
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

Spring Boot Pivotal Cloud Cache Demo

The following demo shows how to use Pivotal Cloud Cache from a Spring Boot application.

alt tag


  • Create a Pivotal Cloud Cache service instance as shown below
$ cf create-service p-cloudcache extra-small pas-pcc
Creating service instance pas-pcc in org pivot-papicella / space development as

Create in progress. Use 'cf services' or 'cf service pas-pcc' to check operation status.
  • Install Spring Cloud GemFire Connector dependencies into your local Maven repo:
$ git clone -b v1.1.0  
$ cd spring-cloud-gemfire-connector  
$ gradle clean install
  • Connect to your PCC service using GemFire GFSH as shown below and create the "employee" region
gfsh>create region --name=employee --type=PARTITION
              Member                | Status
----------------------------------- | -------------------------------------------------------------------
cacheserver-PCF-PEZ-Heritage-RP04-1 | Region "/employee" created on "cacheserver-PCF-PEZ-Heritage-RP04-1"
cacheserver-PCF-PEZ-Heritage-RP04-3 | Region "/employee" created on "cacheserver-PCF-PEZ-Heritage-RP04-3"
cacheserver-PCF-PEZ-Heritage-RP04-0 | Region "/employee" created on "cacheserver-PCF-PEZ-Heritage-RP04-0"
cacheserver-PCF-PEZ-Heritage-RP04-2 | Region "/employee" created on "cacheserver-PCF-PEZ-Heritage-RP04-2"
  • clone the project code as follows
$ git clone
  • Package as shown below
$ cd SpringBootPCCDemo
$ mvn package
  • Edit manifest.yml to add the correct service name, if you used the name above you won't have to change this
- name: pas-pcc-springboot
  random-route: true
  path: ./target/springboot-pcc-demo-0.0.1-SNAPSHOT.jar
  buildpack: java_buildpack_offline
  - pas-pcc
  • Push to Pivotal Cloud Foundry as follows
$ cf push

Pas Apicella [papicella at] is a Senior Platform Architect at Pivotal Australia