Difficulty: Beginner
Estimated Time: 15 minutes

Do you want to set up your first Spring Boot project? Then, you're at the right place!

In this scenario, we'll learn how to:

  • Create a Spring Boot project for a simple REST server
  • Create some service endpoints
  • Pass parameters to an endpoint
  • Create a REST endpoint that uses Cassandra

This scenario is a brief introduction to Spring Boot so you can see how to create an initial project.

ver 0.005

This scenario introduced Spring Boot and showed how to set up a simple Spring Boot project.

In this scenario, we learned how to:

  • Create a Spring Boot project for a simple REST server
  • Create some service endpoints
  • Pass parameters to an endpoint
  • Create a REST endpoint that uses Cassandra

We have only just begun to scratch the surface of Spring Boot. We didn't use a lot of the spring boot features like Spring Data or Spring Rest, etc. The next scenario in this series explores more of the Spring Boot projects.

Build a Spring Boot REST Service

Step 1 of 7

Run Spring Initiailizr

We'll start our project by using Spring Initializr to configure the project.


NOTE: To simplify our lives with Katacoda, we have already run Spring Initializr and downloaded its resulting zip file to the Katacoda VM. But, we'll walk you through the Spring Initializr process anyway so yo uunderstand what we did.


You can find Spring Initializr here.

Fill out the project metadata as shown including adding the Spring Boot DevTools and Spring Reactive Web dependencies. Spring initializr

Normally, you would click the Generate button to create the zip file, but we have done that for you.

Let's unzip the Spring Initializr project.

unzip spring-petclinic-reactive.zip

The project actually runs at this point, although it doesn't do anything. Let's run it anyway just to see everything compile and run.

export JAVA_HOME="/usr/lib/jvm/default-java"
cd /root/spring-petclinic-reactive
mvn spring-boot:run

You can access the running server by clicking on the following.

Great! We have a basic server running.