Creating and deploying Spring applications using the Tomcat 7 cartridge
Spring Framework is a very popular alternative to Java EE web development. Java developers around the world use Spring Framework to build their enterprise applications. Spring Framework is often thought of as a lightweight alternative to Java EE, and Java developers normally use a lightweight web container, such as Apache Tomcat, for deployment. At the time of this writing, OpenShift supports two versions of Apache Tomcat: Apache Tomcat 6 and Apache Tomcat 7. They are shown using the following command:
$ rhc cartridges|grep Tomcat jbossews-1.0 Tomcat 6 (JBoss EWS 1.0) web jbossews-2.0 Tomcat 7 (JBoss EWS 2.0) web
In this recipe, you will learn how to develop a simple Spring Framework application from scratch using OpenShift's Tomcat 7 cartridge. The application exposes a REST endpoint. When a user makes an HTTP request to /api/v1/ping
, then the applicaton will return a JSON...