How To Create a Spring Boot Project
Tags: java, kotlin, microservices, springboot
Published: 2021-03-12 00:30:55

---
title: How To Create a Spring Boot Project
published: true
date: 2021-02-12 03:00:06 UTC
tags: Java, Kotlin, Microservices, Springboot
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0oyacs7fe7pi9xwpdzgl.jpg
canonical_url: https://theanirban.dev/how-to-create-a-spring-boot-project/
---

## 1. Overview

In this tutorial, we'll look into the different ways we can create a Spring Boot project.

## 2. Using Spring Initializer in spring.io

We can create a Spring Boot project by using the Spring Initializer in [start.spring.io](http://start.spring.io). **This is the quickest way to create an application in Spring Boot which is one of the most popular frameworks for creating web applications**.

The Spring Initializer offers different options for choosing the build tools, programming languages, Spring Boot versions, and the related dependencies.

![springio.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1615505502683/l-N9Vlhmd.png)

### 2.1. Build Tools

**We have the option to choose between Maven and Gradle as our build tool**. In this case, we'll choose Gradle as our build tool for the Spring Boot application.

### 2.2. Language

**Spring Initializer supports multiple JVM languages like Java, Kotlin, and Groovy to build a web application**. In this case, we'll choose Kotlin as our programming language.

### 2.3. Version

We should always aim to choose the latest stable Spring Boot version for building our application. **The SNAPSHOT versions are not stable and should be avoided. The versions labeled with M signifies Milestone versions**. It refers to a future stable version.

In this case, the latest stable version is 2.4.2 while M1 is supposed to have version 2.5.0 (M1). So, version 2.5.0 (M1) is the future stable release version.

### 2.4. Project Metadata

**We can also define the project metadata which includes the group, artifact, name, description, package name, packaging, and Java version**. In this case, we'll choose Jar as the packaging option. The Java version will be 11.

### 2.5. Dependencies

Finally, we have to define the dependencies by selecting the **_Add Dependency_** button. **In this case, we can add a Spring Web dependency which should be sufficient to build a simple RESTful web application**.

We can select the Generate button and download the ZIP archive locally. After that, we can extract the project and import it into an IDE like IntelliJ IDEA, Spring Tools, Eclipse, etc.

## 3. Using Spring Initializer in IntelliJ IDEA

We can create a Spring Boot project by using the Spring Initializer plugin in IntelliJ IDEA.

### 3.1. Create a New Project

Firstly, we select the option Create New Project.

![intellij1.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1615505520635/CCfIZdKKa.png)

### 3.2. Use Spring Initializer

After that, we select the Spring Initializer to generate a Spring Boot application. Then we have to download or assign a project SDK and select Next.

![intellij2.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1615505539512/87JwuogN6.png)

### 3.3. Configure Project Settings

Now we'll configure the project settings as per our requirements. **In this case, we choose Gradle as the build tool, Kotlin as the programming language, Jar as the packaging option, and Java version 11**.

Select Next to continue.

![intellij3.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1615505555294/5I56DUZmq.png)

### 3.4. Select Dependencies

Also, we need to define the external dependencies of our Spring Boot application. **We can choose Spring Web dependency which should be sufficient to build a simple RESTful web application**.

Select Next to continue.

![intellij4.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1615505569390/vrP42FI1k.png)

### 3.5. Project Name and Location

Finally, we can define a name for the Spring Boot project and the directory in the local machine. In this case, we continue with the default values.

Select Finish and the Spring Boot project is created.

![intellij5.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1615505581083/3vvixxp93.png)

## 4. Conclusion

In this tutorial, we discussed the different ways to create a Spring Boot project.

_Originally published on [Anirban's Tech Blog](https://theanirban.dev/)_.