Build Spring Boot Apps with VS Code

Visual Studio Code is an ideal lightweight development environment for Spring Boot developers using extensions including:

Create Project

Spring Initializr allows you to search for dependencies and generate Spring Boot project.

To install, launch VS Code and from the Extensions view (⇧⌘X (Windows, Linux Ctrl+Shift+X)) search box, type vscode-spring-initializr.

Once you have the extension installed, open the Command Palette (⇧⌘P (Windows, Linux Ctrl+Shift+P)), type Spring Initializr to start generating a Maven or Gradle project and then follow the wizard.

Spring Initializr

Develop Application

Spring Boot Support extension including language server provides support for working with Spring Boot application.properties, application.yml and .java files.

The extension supports quick-navigate through source code, quick-access for running apps, show live application information and smart code completion. Similiar completion and validation features are also available for .properties and .yml files.

Debug Application

You can press F5 to run your application. After setting a breakpoint in your source code, refresh your browser to hit the breakpoint. Details about debugging can be found in Java Debugging

Next steps