Using spring boot in VS Code

Aditya Kumar Dubey
2 min readMay 16, 2022

Before proceeding with the tutorial ,I am assuming that your VS Code is set up for Java development. Check out below link to set up vs code for Java development.

https://code.visualstudio.com/docs/java/java-tutorial

Create a folder and open it in your vs code. Download Spring Initializr Java Support extension .It helps you to customize your projects with configurations and manage Spring Boot dependencies.

Creating Maven Project

Now open command palette(shift+ctrl+p) and type spring ,from the suggestions select “create a Maven Project”.

Select the following as

snaphot version : 2.6.7

language : Java

groupId : (by default it is com.example)

artefact Id: (by default it is demo)

packaging type : jar

Java version : 11

select spring dependency as per project requirement for this tutorial I am selecting only spring web,you can select multiple dependencies.After selecting the dependency press Enter and click on generate file in the pop up. After successful completion of the above steps your project structure would look like this.

Open your terminal and enter the following commands

cd demo

./mvnw spring-boot:run

your server will be up and running on port 8080.

For easy and smooth development of spring boot application you can download extensions like Spring Boot Extension Pack and Extension Pack for Java .

Note:You may need to restart Vs code or even restart your System for this to work

--

--