Wayback Machine
151 captures
10 Mar 2018 - 05 Jun 2025
May AUG Sep
Previous capture 12 Next capture
2021 2022 2023
success
fail
About this capture
COLLECTED BY
Collection: Save Page Now
TIMESTAMPS
loading
The Wayback Machine - https://web.archive.org/web/20220812050334/https://code.visualstudio.com/docs/java/java-spring-boot
Skip to content  Visual Studio Code
  • Docs
  • Updates
  • Blog
  • API
  • Extensions
  • FAQ
  • Learn
  • Search
  • Search Search
  • Download VS Code Download VS Code Download

Version 1.70 is now available! Read about the new features and fixes from July.

Dismiss this update
'; document.body.appendChild(div.children[0]); } function pushCodingPackEvent(language, os) { let id = `${language}-${os}-coding-pack`; var analytics = window.vscodeAnalytics; analytics && analytics.event( 'click', 'download', id, ); }
  • Overview
  • Setup
    • Overview
    • Linux
    • macOS
    • Windows
    • Raspberry Pi
    • Network
    • Additional Components
    • Enterprise
    • Uninstall
  • Get Started
    • Intro Videos
    • Tips and Tricks
    • User Interface
    • Themes
    • Settings
    • Key Bindings
    • Display Language
    • Telemetry
  • User Guide
    • Basic Editing
    • Extension Marketplace
    • IntelliSense
    • Code Navigation
    • Refactoring
    • Debugging
    • Version Control
    • Working with GitHub
    • VS Code for the Web
    • Tasks
    • Settings Sync
    • Snippets
    • Emmet
    • Command Line Interface
    • Workspace Trust
    • Multi-root Workspaces
    • Accessibility
  • Terminal
    • Terminal Basics
    • Terminal Profiles
    • Shell Integration
  • Languages
    • Overview
    • JavaScript
    • JSON
    • HTML
    • CSS, SCSS and Less
    • TypeScript
    • Markdown
    • PowerShell
    • C++
    • Java
    • PHP
    • Python
    • Julia
    • R
    • Rust
    • Go
    • T-SQL
    • C#
    • .NET
  • Node.js / JavaScript
    • Working with JavaScript
    • Node.js Tutorial
    • Node.js Debugging
    • Node.js Deployment
    • Browser Debugging
    • Angular Tutorial
    • React Tutorial
    • Vue Tutorial
    • Ember Tutorial
    • Debugging Recipes
    • Extensions
  • TypeScript
    • Tutorial
    • Compiling
    • Editing
    • Refactoring
    • Debugging
  • Python
    • Tutorial
    • Editing Code
    • Linting
    • Debugging
    • Environments
    • Testing
    • Data Science
    • Python Interactive
    • Django Tutorial
    • Flask Tutorial
    • Create containers
    • Python on Azure
    • Settings Reference
  • Java
    • Getting Started
    • Navigate and Edit
    • Refactoring
    • Formatting and Linting
    • Project Management
    • Build Tools
    • Run and Debug
    • Testing
    • Spring Boot
    • Application Servers
    • Java on Azure
    • GUI Applications
    • Extensions
    • FAQ
  • C++
    • Intro Videos
    • GCC on Linux
    • GCC on Windows
    • GCC on Windows Subsystem for Linux
    • Clang on macOS
    • Microsoft C++ on Windows
    • Build with CMake
    • CMake Tools on Linux
    • Editing
    • Debugging
    • Configure debugging
    • Settings
    • Configure IntelliSense for cross-compiling
    • FAQ
  • Containers
    • Overview
    • Node.js
    • Python
    • ASP.NET Core
    • Debug
    • Docker Compose
    • Registries
    • Deploy to Azure
    • Choose a dev environment
    • Customize
    • Develop with Kubernetes
    • Tips and Tricks
  • Data Science
    • Overview
    • Jupyter Notebooks
    • Data Science Tutorial
    • Python Interactive
    • PyTorch Support
    • Azure Machine Learning
  • Azure
    • Extensions
    • Deployment
    • Remote Debugging for Node.js
    • Docker
    • MongoDB
    • Kubernetes
    • Azure Kubernetes Service
  • Remote
    • Overview
    • SSH
    • Containers
    • Windows Subsystem for Linux
    • GitHub Codespaces
    • VS Code Server
    • SSH Tutorial
    • Containers Tutorial
    • WSL Tutorial
    • Attach to Container
    • Create a Dev Container
    • Advanced Containers
    • devcontainer.json
    • devcontainer CLI
    • Tips and Tricks
    • FAQ

Topics

Spring Boot in Visual Studio Code

Visual Studio Code is an ideal lightweight development environment for Spring Boot application developers and there are several useful VS Code extensions including:

  • Spring Boot Tools
  • Spring Initializr
  • Spring Boot Dashboard

We recommend installing the Spring Boot Extension Pack that includes all of the extensions above.

If you run into any issues when using the features below, you can contact us by opening an issue.

Prerequisites

To develop a Spring Boot application in Visual Studio Code, you need to install the following:

  • Java Development Kit (JDK)
  • Extension Pack for Java
  • Spring Boot Extension Pack

Install the Extension Pack for Java

Install the Spring Boot Extension Pack

Note: More information about how to get started can be found at Getting Started with Java tutorial.

Create the project

The Spring Initializr extension allows you to search for dependencies and generate new Spring Boot projects.

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

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

Edit the project

The Spring Initializr extension allows you to add dependencies after generating a new Spring Boot project.

Navigate to your pom.xml file and right-click to select Add starters.... A dropdown will show the dependencies you already have beginning with a √ . You can search for other dependencies you want to add to your project. Or you can click on the existing dependencies to remove them.

Develop the application

The Spring Boot Tools extension includes rich language support for working with Spring Boot application.properties, application.yml, and .java files.

The extension supports the following features:

  • Quickly navigate to a Spring element in your workspace
  • Smart code completion for Spring specific components
  • Quick access to running Spring apps
  • Live application information
  • Code templates

Similar code completion and validation features are also available for .properties and .yml files.

To learn how to use these features, you can visit this detailed usage guide.

Below is an example showing live application information.

Run the application

In addition to using F5 to run your application, there's the Spring Boot Dashboard extension, which lets you view and manage all available Spring Boot projects in your workspace as well as quickly start, stop, or debug your project.

Next steps

  • To deploy your web app, see Java Web Apps with VS Code.
  • To containerize a web app and deploy as a Docker container, check out Docker in VS Code.
  • To learn more about Java debugging features, see Running and debugging Java.
12/22/2021

In this article there are 6 sectionsIn this article

  • Prerequisites
  • Create the project
  • Edit the project
  • Develop the application
  • Run the application
  • Next steps
  • Hello from Seattle.
  • Follow @code
  • Support
  • Privacy
  • Manage Cookies
  • Terms of Use
  • License
Microsoft homepage Microsoft homepage © 2022 Microsoft