Thiago Teixeira
Thiago Teixeira Senior Software Engineer

How to Create a Spring Boot Application

How to Create a Spring Boot Application

First, you must go to the following website:

After, fill in the group and the artifact fields. Example:

  • Group: com.mydomain
  • Artifact: demo

In the Search for dependencies field fill in: Web

The other fields can use the default value.

After you have filled in all the fields, you will have something corresponding to the image below:

First step with Sprint Boot

Now, click on the Generate Project button

So, download the ZIP file and unzip it.

Using a text editor ( I recommend Visual Studio Code), open the demo folder.

Now we are going to create the web controller named HelloWorldController.java: Hello World Controller using Spring Boot

Using the command prompt you can initialize the application using the mvn spring-boot:run command using Maven. After the execution, you will see the success message referring to the initialization from an embedded Apache Tomcat.

** 2017-12-02 12:40:50.915 INFO 7444 — [ main] com.example.demo.DemoApplication : Started DemoApplication in 6.207 seconds (JVM running for 14.739) **

So, access http://localhost:8080 in the web browser.

Hello World Controller using Spring Boot in the browser

That was pretty easy :)

comments powered by Disqus