DEV Community

Jerome Ryan Villamor
Jerome Ryan Villamor

Posted on

Scaffold a Java spring boot application

Trying to start a spring boot application nowadays is very easy. There are many ways on how to do it such as creating via your favorite IDE (IntelliJ, Eclipse, etc). My favorite is creating via start.spring.io. It is the simplest and the easiest to do.

First is go to https://start.spring.io/

Image description

On the left side are the configurations we required to specify

  • For the dependency manager, you may choose which one you want. I choose Maven as I am more familiar with it.
  • For the language, choose Java
  • For the spring boot version, the default is the latest stable version which is as of this writing, it’s 3.2.5.
  • Lastly for Project metadata, we will temporarily use the default metadata since this is just a demo. Just make sure you choose the Java version installed on your machine.

On the right side, if we click the add dependencies button, it will prompt all the dependencies we can add to our spring boot application. Since we are interested in creating a web application, I will add the spring web. Of course, there is a lot of dependency we need to build a web application, but for now this is more than enough to show you the basics of spring boot.

Image description

On the right side, if we click the add dependencies button, it will prompt all the dependencies we can add to our spring boot application. Since we are interested in creating a web application, I will add the spring web. Of course, there is a lot of dependency we need to build a web application, but for now this is more than enough to show you the basics of spring boot.

Let’s wrap this scaffolding and click the button Generate. It will download the code structure for our application. Unzip it and let’s open it in our IDE. In my case, I prefer to use IntelliJ.

Image description

This is the default folder structure of spring boot, same as the typical java application. If we go to the terminal and run mvn clean install & mvn spring-boot:run, it will prompt logs like the image below.

Image description

If you can see the same line of logs in your terminal, pat your back! That is a success. On next article, let’s create our first endpoint

Top comments (0)