Wayback Machine
151 captures
10 Mar 2018 - 05 Jun 2025
Jul OCT Nov
Previous capture 04 Next capture
2022 2023 2024
success
fail
About this capture
COLLECTED BY
Collection: Save Page Now
TIMESTAMPS
loading
The Wayback Machine - https://web.archive.org/web/20231004204427/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.83 is now available! Read about the new features and fixes from September.

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
    • AI Tools
    • Debugging
    • VS Code for the Web
    • Tasks
    • Profiles
    • Settings Sync
    • Snippets
    • Emmet
    • Command Line Interface
    • Workspace Trust
    • Multi-root Workspaces
    • Accessibility
    • Port Forwarding
  • Source Control
    • Overview
    • Introduction to Git
    • Collaborate on GitHub
    • FAQ
  • Terminal
    • Terminal Basics
    • Terminal Profiles
    • Shell Integration
    • Appearance
    • Advanced
  • Languages
    • Overview
    • JavaScript
    • JSON
    • HTML
    • CSS, SCSS and Less
    • TypeScript
    • Markdown
    • PowerShell
    • C++
    • Java
    • PHP
    • Python
    • Julia
    • R
    • Ruby
    • Rust
    • Go
    • T-SQL
    • C#
    • .NET
    • Polyglot
  • Node.js / JavaScript
    • Working with JavaScript
    • Node.js Tutorial
    • Node.js Debugging
    • Deploy Node.js Apps
    • Browser Debugging
    • Angular Tutorial
    • React Tutorial
    • Vue Tutorial
    • Debugging Recipes
    • Performance Profiling
    • Extensions
  • TypeScript
    • Tutorial
    • Compiling
    • Editing
    • Refactoring
    • Debugging
  • Python
    • Tutorial
    • Editing Code
    • Linting
    • Formatting
    • Debugging
    • Environments
    • Testing
    • Python Interactive
    • Django Tutorial
    • Flask Tutorial
    • Create containers
    • Deploy Python Apps
    • Python in the Web
    • Settings Reference
  • Java
    • Getting Started
    • Navigate and Edit
    • Refactoring
    • Formatting and Linting
    • Project Management
    • Build Tools
    • Run and Debug
    • Testing
    • Spring Boot
    • Application Servers
    • Deploy Java Apps
    • 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
  • C#
    • Get Started
    • Navigate and Edit
    • IntelliCode
    • Refactoring
    • Formatting and Linting
    • Project Management
    • Build Tools
    • Package Management
    • Run and Debug
    • Testing
    • FAQ
  • Docker
    • 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
    • Manage Jupyter Kernels
    • Jupyter Notebooks on the web
  • Azure
    • Extensions
    • Deployment
    • Remote Debugging for Node.js
    • Docker
    • MongoDB
    • Kubernetes
    • Azure Kubernetes Service
  • Remote
    • Overview
    • SSH
    • Dev Containers
    • Windows Subsystem for Linux
    • GitHub Codespaces
    • VS Code Server
    • Tunnels
    • SSH Tutorial
    • WSL Tutorial
    • Tips and Tricks
    • FAQ
  • Dev Containers
    • Overview
    • Tutorial
    • Attach to Container
    • Create a Dev Container
    • Advanced Containers
    • devcontainer.json
    • Dev Container CLI
    • Tips and Tricks
    • FAQ
Edit

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.

To help get you started with Java Spring Boot development, you can use the Java Spring profile template that includes useful extensions, settings, and Java Spring Boot code snippets.

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

  • Java Spring profile template - Create a new profile with a curated set of extensions, settings, and snippets.
  • 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 © 2023 Microsoft