Last updated: 2024-05-01

  1. Learn
  2. Spring Boot
  3. Start Application

How to start a Spring Boot application

There are several ways to start a Spring Boot application. The three most common ways - Spring Initializr, Bootify and JHipster - to create an application are quickly explained below. The last section will show how to launch our created application.

Spring Initializr

The Spring Initializr is the official tool for starting a Spring Boot application. Here you can configure the basic setup such as the language or the build tool. There is also a search function for dependencies, which provides helpful explanations on top.

Configuring a project in the Spring Initializr

Configuring a project in the Spring Initializr

The generated application provides the very basic framework of a Spring Boot app - there is no application logic yet. Depending on the selected libraries, some additional configuration is included. Alternatively, the Initializr can also be accessed via a CLI or directly from IntelliJ.

Bootify

With Bootify, a Spring Boot project can also be configured in the browser - simply start here. In addition to the basic setup, a database can be selected and a custom database schema can be created for it.

Configuring the database schema in Bootify

Configuring the database schema in Bootify

It is also possible to activate CRUD functionality for the entities, either for the REST API or for the Thymeleaf or Angular frontend. With many available settings, the project can be configured in line with your own preferences - so that the exact code required for your own application is generated. Advanced features such as Spring Security are available in the Professional plan.

JHipster

JHipster can also be used to create a Spring Boot application with a database schema and CRUD functionality. It can be started in the browser via JHipster Online, whereby the database schema must be written in the JHipster Domain Language (JDL). Further code is then generated in the client only.

As an open source library, all functions are available without limitations. However, the library is also part of the application and there are some processes and restrictions that must be followed - for example, Lombok is not supported. A closer look at the differences between Bootify and JHipster can be found in this article.

Launching a Spring Boot app

In the Spring Boot application that we have created with one of the three tools, Maven or Gradle is always used as a build tool. Both are coming with a Spring Boot plugin, so that the application can be started directly from the console with one command.

Launching the app with Maven

Launching the app with Gradle

The command should be executed in the root directory of our unpacked zip file. This performs all the steps required to build and then start the application. Depending on the setup, it may be necessary to set up additional services such as the database. Another article also explains how to work with Spring Boot in IntelliJ.

Conclusion

Depending on the context, one of the three variants - Spring Initializr, Bootify or JHipster - may be the most suitable for starting a Spring Boot app. Spring Initializr creates the minimal setup of an app, for which an unreleased version can also be selected. Bootify also creates pure Spring Boot prototypes and includes a custom database schema as well as the selection of many preferences. JHipster has some process restrictions, but offers additional options for the frontend with React and Vue.

Start Project
No registration required