IntelliJ IDEA Plugin for Spring Boot: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
 
(48 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=


The Spring Boot IntelliJ IDEA plugin [[Spring Initializr#Overview|Spring Initializr]] API to generate [[Spring Boot]] projects.
The Spring Boot IntelliJ IDEA plugin uses [[Spring Initializr#Overview|Spring Initializr]] API to generate [[Spring Boot]] projects.


=Installation=
=Installation=


It should be installed by default, go to the plugin list and search for "Spring Boot".
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=
=Procedures=


==Create a New Spring Boot Project with Spring Initializr==
==Create a New Spring Boot Project with Spring Initializr==
This procedure is used by {{Internal|Writing_a_REST_Service_with_Spring_Boot#Initialize_the_Project_with_Spring_Initializr|Writing a REST Service with Spring Boot}}


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: Autogenerated based on group, including the artifact name, you may want to modify: <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
 
Spring Boot version.
 
Dependencies.
 
Different dependencies are required for different types of projects. See:
* [[Writing_a_REST_Service_with_Spring_Boot#Spring_Boot_Dependencies|Writing a REST Service with Spring Boot &#124; 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}}


Project Metadata
Also see: {{Internal|Spring_Initializr#Spring_Project_Structure|Spring Initializr Projecte Structure}}
* 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


===Dependencies===
* Core
* Core
** [[Spring_Boot_Concepts#Developer_Tools|DevTools]]
** [[Spring_Boot_Concepts#Developer_Tools|DevTools]]
Line 44: Line 73:
** Session
** Session
** [[Spring_Boot_Concepts#Caching|Cache]]
** [[Spring_Boot_Concepts#Caching|Cache]]
** Validation
** [[Spring_Validation_Concepts#Overview]]
** Retry
** [[Spring_Framework#Retry|Retry]]
** Aspects
** [[Spring_Framework#AOP|Aspects]]
* Web
** [[Spring_MVC_Concepts#Overview|Web]]
** [[SpringWebFluxReactive Web]]
** [[Spring_Data_Concepts#Spring_Data_REST|Rest Repositories]]
** [[Spring_Data_Concepts#HAL_Browser|Rest Repositories HAL Browser]]
** [[Spring HATEOAS#Concepts|HATEOAS]]
** Web Services
** Jersey (JAX-RS)
** Websocket
** REST Docs
** Vaadin
** Apache CXF (JAX-RS)
** Ratpack
** Mobile
** Keycloak
* Template Engines
** Thymeleaf
** Freemarker
** Mustache
** Groovy Templates
* SQL
** [[Spring_Data_Concepts#Spring_Data_JPA|JPA]]
** [[Spring_Data_Concepts#MySQL_Support|MySQL]]
** [[Spring_Data_Concepts#H2_Support|H2]]
** [[Spring_Data_Concepts#JDBC|JDBC]]
** MyBatis
** [[Spring_Data_Concepts#PostgreSQL_Support|PostgreSQL]]
** SQL Server
** HSQLDB
** Apache Derby
** Liquibase
** [[Spring Flyway Support#Overview|Flyway]]
** JOOQ
* NoSQL
** [[Spring_Data_Redis#Overview|Redis]]
** [[Spring_Data_Redis#Reactive_Redis|Reactive Redis]]
** [[Spring_Data_Concepts#MongoDB|MongoDB]]
** [[Spring_Data_Concepts#Reactive_MongoDB|Reactive MongoDB]]
** Embedded MongoDB
** [[Spring_Data_Concepts#Elasticsearch|Elasticsearch]]
** [[Spring_Data_Concepts#Solr|Solr]]
** [[Spring_Data_Concepts#Cassandra|Cassandra]]
** [[Spring_Data_Concepts#Reactive_Cassandra|Reactive Cassandra]]
** [[Spring_Data_Concepts#Couchbase|Couchbase]]
** [[Spring_Data_Concepts#Reactive_Couchbase|Reactive Couchbase]]
** [[Spring_Data_Concepts#Neo4j|Neo4j]]
* Integration
** [[Spring_Integration|Spring Integration]]
** [[Spring_Integration_Concepts#RabbitMQ|RabbitMQ]]
** [[Spring for Apache Kafka|Kafka]]
** [[Spring for Apache Kafka|Kafka Streams]]
** [[Spring_Integration_Concepts#ActiveMQ|JMS (ActiveMQ)]]
** [[Spring_Integration_Concepts#Artemis|JMS (Artemis)]]
* Cloud Core
** Cloud Bootstrap
** Cloud Function
** [[Spring_Cloud_Security|Cloud Security]]
** [[Spring_Cloud_Security|Cloud OAuth2]]
** [[Spring_Cloud_Task|Cloud Task]]
* Cloud Support
** Cloud Connectors
** Open Service Broker
* Cloud Config
** [[Spring_Cloud_Config|Config Client]]
** [[Spring_Cloud_Config|Config Server]]
** [[Spring Cloud Vault|Vault Configuration]]
** Zookeeper Configuration
** Consul Configuration
* Cloud Discovery
** [[Spring_Cloud_Netflix|Eureka Discovery]]
** [[Spring_Cloud_Netflix|Eureka Server]]
** Zookeeper Discovery
** Cloud Foundry Discovery
** Consul Discovery
* Cloud Routing
** Zuul
** Gateway
** [[Spring Cloud Netflix|Ribbon]]
** Feign
* Cloud Circuit Breaker
** [[Spring Cloud Netflix|Hystrix]]
** [[Spring Cloud Netflix|Hystrix Dashboard]]
** Turbine
** Turbine Stream
* Cloud Tracing
** Sleuth
** Zipkin Client
* Cloud Messaging
** Cloud Bus
** Cloud Stream
** Reactive Cloud Stream
* Cloud AWS
** AWS Core
** AWS JDBC
** AWS Messaging
* Cloud Contract
** Cloud Contract Verifier
** Cloud Contract Stub Runner
* Pivotal Cloud Foundry
* Azure
* Spring Cloud GCP
* I/O
** Batch
** Mail
** Apache Camel
** LDAP
** Quartz Scheduler
** Spring Shell
** Statemachine
* Ops
** [[Spring Boot Actuator|Actuator]]
** [[Spring_Boot_Admin|Spring Boot Admin (Server)]]
** [[Spring_Boot_Admin|Spring Boot Admin (Client)]]

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