IntelliJ IDEA Plugin for Spring Boot: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
Line 20: Line 20:


Splash screen -> Create New Project -> Spring Initializr (note to '''not''' chose "Spring", but "Spring Initializr")
Splash screen -> Create New Project -> Spring Initializr (note to '''not''' chose "Spring", but "Spring Initializr")
This procedure works even if the project was partially initialized before.
Name: The human-name for the project.
Location: Choose the root directory of the project. You can use a partially-initialized project, you'll get a warning (Directory is not empty).
Language: Java
Type: Gradle
Group: <code>playground.smoke</code>
Artifact: smoke
Package Name: <code>playground.smoke</code>


Project SDK
Project SDK


Choose Initializr Service URL -> Default https://start.spring.io -> Next
Java: 11
 
Packaging: Jar
 
Choose Initializr Service URL Default https://start.spring.io Next


Project Metadata
Project Metadata

Revision as of 23:35, 6 February 2022

Internal

Overview

The Spring Boot IntelliJ IDEA plugin uses Spring Initializr API to generate Spring Boot projects.

Installation

In IntelliJ 2021.2.1, the Spring Boot plugin is bundled and installed by default. Go to the plugin list and search for "Spring Boot".

Procedures

Create a New Spring Boot Project with Spring Initializr

This procedure is used by

Writing a REST Service with Spring Boot

Splash screen -> Create New Project -> Spring Initializr (note to not chose "Spring", but "Spring Initializr")

This procedure works even if the project was partially initialized before.

Name: The human-name for the project.

Location: Choose the root directory of the project. You can use a partially-initialized project, you'll get a warning (Directory is not empty).

Language: Java

Type: Gradle

Group: playground.smoke

Artifact: smoke

Package Name: playground.smoke

Project SDK

Java: 11

Packaging: Jar

Choose Initializr Service URL → Default https://start.spring.io → Next

Project Metadata

  • Group
  • Artifact
  • Type (Maven Project, Maven POM, Gradle Project, Gradle Config)
  • Language
  • Packaging
  • Java Version
  • Version
  • Name
  • Description
  • Package (autogenerated based on group, including the artifact name, you may want to modify).

Dependencies

Project name:

Project location:

The result is similar to:

IntelliJIDEAPluginForSpringBootResult.png

Generated build.gradle:

build.gradle

Generated settings.gradle:

settings.gradle

Also see:

Spring Initializr Projecte Structure