Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Branch: master
Pull request Compare This branch is 14 commits behind cf-samples-attic:master.

Fetching latest commit…

Cannot retrieve the latest commit at this time

..
Failed to load latest commit information.
src
README.md
hsql-manager.launch
hsql-server.launch
pom.xml
server.properties

README.md

Spring Batch Cloud Sample

This app is the same as the one in Spring Batch Admin Samples, but enhanced to run nicely in CloudFoundry. Unlike most of the other CloudFoundry samples it uses Spring 3.0 (not 3.1 which hasn't shipped yet).

Set Up

The app is a vanilla Spring MVC web application, so you can build with Maven (or your tool of choice) and deploy with vmc, or use the SpringSource ToolSuite CloudFoundry server tooling.

First create the services (the names are significant because they are hard-coded in the application). Using the command line:

$ vmc create-service mysql mysql

Then build and deploy:

$ mvn package
$ vmc push batch --nostart --path target
$ vmc bind-service mysql batch
$ vmc start batch

The application will run fine without the mysql service, but it will use an in-memory database, so only one instance makes sense, and the data are lost on restart.

Basic Use Cases

Basic use cases are described in more detail in the Spring Batch Admin user guide.

Something went wrong with that request. Please try again.