Visual studio code is the most popular, open-source and lightweight editor in the market. Spring boot has also another popular and powerful Framework in the Java ecosystem. It gains popularity because of simplicity and bootstrap the development. Spring boot is very handy to develop microservice-based applications and also support for cloud-native development.
This article is for those who want to leverage their VS code editor to develop spring framework application. Spring comes up with tools to support the development of spring framework based application in VSCode.
Spring really provides the flexibility to a developer, for spring developer you don’t need any special editor, IDE or OS or any tool suite as well.
Spring is nature’s way of saying, ‘Let’s Party!
As per the above quotes spring framework really saying developer don’t worry let’s do a party I will take care of everything.
If you have hit this article that means you are familiar with Visual Studio code editor. You can download visual studio code if you haven’t by using the below link:
Configure the Spring boot with Visual Studio Code
After installation of vs code editor on your local system. Now we have considered below points to configure Spring boot with VS code.
I will assume you have done below configurations
- VS code installation.
- Java extension for VS Code.
- Kotlin extension if you want to develop a spring boot app using kotlin.
If above everything is done then go and open VS Code and go to extension and search for “spring”. You will able to something like the below image in your vscode editor.
Click and install “Spring Boot Extension Pack” Once the installation is done reload the VS code.
Spring Boot Extension Pack is acollection of extensions for developing and deploying Spring Boot Application.
- Spring boot tools.
- Spring Initializr Java Support.
- Spring Boot Dashboard.
Spring Boot Tools:
VSCode extension and Language Server providing support for working with Spring Boot
Spring Initializr Java Support:
Spring Initializr is a lightweight extension to quickly generate a Spring Boot project in Visual Studio Code (VS Code). It helps you to customize your projects with configurations and manage Spring Boot dependencies.
Spring Boot Dashboard:
Spring Boot Dashboard is a lightweight extension in Visual Studio Code (VS Code). With an explorer in the side bar, you can view and manage all available Spring Boot projects in your workspace. It also supports the features to quickly start, stop or debug a Spring Boot project.
- View Spring Boot apps in workspace
- Start / Stop a Spring Boot app
- Debug a Spring Boot app
- Open a Spring Boot app in the browser
- Generate a Maven/Gradle Spring Boot project
- Customize configurations for a new project (language, group id, artifact id, boot version, and dependencies)
- Search for dependencies
- Quickstart with last settings
- Edit Spring Boot dependencies of an existing Spring Boot project
Extention pack contains:
- IDE Java tooling for developing and troubleshooting Spring Boot applications.
- It provides support for editing Cloud Foundry deployment manifest
.ymlfiles for Spring Boot application deployment.
- The Concourse CI Pipeline Editor provides support for setting up Concourse build pipeline for the Spring Boot application.
- It provides support for generating quickstart Spring Boot Java projects with Spring Initiailizr API.
- It provides an explorer in the sidebar where you can view all of a workspace’s spring boot projects conveniently in one place.
This is it for now up to installation.
Want to create an application using vscode, check the below video.
Use of spring initializer
- Launch VS Code
Ctrl + Shift + Pto open the command palette.
Spring Initializrto start generating a Maven or Gradle project.
- Follow the wizard.
- Right-click inside the
pom.xmlfile and choose
Edit startersfor dependency refactoring. (Gradle project is not supported yet, PR is welcome for it.)
Shortcuts may change based on the Operating System.