Difficulty: beginner
Estimated Time: 15 minutes

In this scenario you will get started developing Spring Boot applications using the Red Hat OpenShift Application Runtimes platform. We will be downloading a simple Spring Boot application with the Spring Initializr and then taking a look at all the steps required to get this base application deployment ready. After that, we'll be taking a look at a project that we've set up using the RHOAR Launcher, a tool that helps us skip some of the additional steps and provides a ready-to-use project right out of the box!

In this scenario you learned about the basics of Spring Boot and how to deploy our Spring Boot applications on to the OpenShift Platform. We will add additional scenarios that explain more how to build Spring Boot applications on OpenShift shortly, so check back to learn.openshift.com

Spring Boot is a powerful and easy to use framework for developing everything from monolithic applications to microservices, but Spring Boot becomes every better when we package it in a container and use an orchestrated platform like OpenShift. When using OpenShift we can, in a very consistent and fast way, deploy our Spring application to multiple environments without worry of environment differences. OpenShift also enables things like Deployment Pipelines and Blue/Green deployments but that was not covered in this scenario.

Additional Resources

More background and related information on Red Hat OpenShift Application Runtimes and Eclipse Vert.x can be found here:

  • Red Hat OpenShift Application Runtimes for Developers - Here you can get started with a project using different boosters and clone that project to your local computer. This also enables you to deploy your application on your own private OpenShift Container Platform or use OpenShift Online that is provided for free from Red Hat.
  • Project Snowdrop homepage - This site has a lot of details of the work that Red Hat is doing to make Spring work great on Kubernetes and OpenShift.

Don’t stop now! The next scenario will only take about 10 minutes to complete.

Creating and Building Applications The Way You Want For The Cloud

Step 1 of 3

Step 1


When developing a Spring application a great place to start is with the Spring Initializr tool. The website will allow you to select from a few simple settings and choose different libraries to include to help you get started with a skeleton Spring application that's ready to go!

1. Spring Initializr

Go ahead and navigate to the Spring Initializr tool. The first thing you'll see is a simple tool for generating Spring applications. This tool is very useful for getting a Spring Boot application up and running very quickly, including whatever dependencies you need. To take a look at all of the dependencies, switch your view to the full version by clicking the link:

Full Version

Scrolling down we can start to see a number of libraries separated by categories. There are SQL, Web, Integration, and plenty of Cloud libraries that we can automatically include in our pom file by checking whichever boxes we want.

NOTE: We're going to avoid downloading an application from Spring Initializr for simplicity's sake. But feel free to create a project and include some libraries and take a look at the fully generated project. We're going to be creating a very similar project in the next step.

If we wanted to generate a project it's as easy as choosing the specific dependencies we wanted (from either the dropdown or manually checking the boxes) and clicking the Generate Project button. This will give us a zip file for download that contains our application.


You have now successfully executed the first step in this scenario and familiarized yourself with the Spring Initializr tool, which will prove to be very useful in the future. In next step we will go over one option to deploy our application to the OpenShift Container Platform.

Local Web Browser
OpenShift Console