Name: spring-amqp-samples
Owner: Cloud Foundry Sample Applications
Description: Sample for Spring AMQP
Created: 2013-06-14 00:08:26.0
Updated: 2017-04-15 16:56:48.0
Pushed: 2013-06-14 05:17:42.0
Homepage: http://www.springsource.org/spring-amqp
Size: 394
Language: Java
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
This is a sample project that shows how to use RabbitMQ with Spring AMQP and Cloud Foundry.
The application uses Spring Java configuration and the cloudfoundry-runtime library to get the credentials necessary to connect to a RabbitMQ service. See the Cloud Foundry documentation for details on configuring a Spring application for Cloud Foundry using the cloudfoundry-runtime library, and the connection configuration code to see how this application is configured.
To build the web application, use the following commands:
$ cd stocks
$ mvn package
To run the application locally, you must first download, install, and run a RabbitMQ server. Once the server is up and running, use the following command to run the web application:
$ mvn jetty:run
After the application starts, you can browse to http://localhost:8080/spring-rabbit-stocks/
.
After installing in the 'cf' command-line interface for Cloud Foundry, targeting a Cloud Foundry instance, and logging in, the application can be pushed using these commands:
$ cd stocks
$ mvn package
$ cf push
The provided manifest.yml
file will be used to provide the application parameters to Cloud Foundry. You may need to provide a different URL for the application if the spring-stocks
URL is already being used in your Cloud Foundry domain.