IntelliJ IDEA Plugin for Spring Boot: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
 
(5 intermediate revisions by the same user not shown)
Line 1: Line 1:
=Internal=
=Internal=
* [[IntelliJ#Subjects|IntelliJ]]
* [[IntelliJ#Subjects|IntelliJ]]
* [[Spring Boot]]
* [[Spring Boot]]
* [[Spring Initializr#Overview|Spring Initializr]]
* [[Spring Initializr#Overview|Spring Initializr]]
* [[Writing_a_REST_Service_with_Spring_Boot#Initialize_the_Project_with_Spring_Initializr|Writing a REST Service with Spring Boot]]


=Overview=
=Overview=
Line 52: Line 52:
* [[Writing_a_REST_Service_with_Spring_Boot#Spring_Boot_Dependencies|Writing a REST Service with Spring Boot | Spring Boot Dependencies]]
* [[Writing_a_REST_Service_with_Spring_Boot#Spring_Boot_Dependencies|Writing a REST Service with Spring Boot | Spring Boot Dependencies]]


For more details on dependencies, see [[#Dependencies| Dependencies]] below.
Finish.
[[Image:IntelliJIDEAPluginForSpringBootResult.png]]
<span id='build.gradle'></span>Generated build.gradle: {{Internal|Spring Initializr build.gradle#Example|build.gradle}}
<span id='build.gradle'></span>Generated settings.gradle: {{Internal|Spring Initializr settings.gradle#Example|settings.gradle}}
Also see: {{Internal|Spring_Initializr#Spring_Project_Structure|Spring Initializr Projecte Structure}}
===Dependencies===
* Core
* Core
** [[Spring_Boot_Concepts#Developer_Tools|DevTools]]
** [[Spring_Boot_Concepts#Developer_Tools|DevTools]]
Line 175: Line 189:
** [[Spring_Boot_Admin|Spring Boot Admin (Server)]]
** [[Spring_Boot_Admin|Spring Boot Admin (Server)]]
** [[Spring_Boot_Admin|Spring Boot Admin (Client)]]
** [[Spring_Boot_Admin|Spring Boot Admin (Client)]]
Project name:
Project location:
The result is similar to:
[[Image:IntelliJIDEAPluginForSpringBootResult.png]]
<span id='build.gradle'></span>Generated build.gradle: {{Internal|Spring Initializr build.gradle#Example|build.gradle}}
<span id='build.gradle'></span>Generated settings.gradle: {{Internal|Spring Initializr settings.gradle#Example|settings.gradle}}
Also see: {{Internal|Spring_Initializr#Spring_Project_Structure|Spring Initializr Projecte Structure}}

Latest revision as of 23:56, 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: Autogenerated based on group, including the artifact name, you may want to modify: playground.smoke

Project SDK

Java: 11

Packaging: Jar

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

Spring Boot version.

Dependencies.

Different dependencies are required for different types of projects. See:

For more details on dependencies, see Dependencies below.

Finish.

IntelliJIDEAPluginForSpringBootResult.png

Generated build.gradle:

build.gradle

Generated settings.gradle:

settings.gradle

Also see:

Spring Initializr Projecte Structure


Dependencies