VS Code + Spring Boot
From Zero to Running
A step-by-step guide to set up your development environment using only free tools. Follow this once and you're ready to code for the entire programme.
-
1Download the installer
Go to code.visualstudio.com → click Download for Windows (or your OS).
-
2Run the installer
Accept defaults. On Windows, tick "Add to PATH" and "Open with Code" — these save time later.
-
3Open VS Code
Launch it from the Start menu or desktop. You'll see the Welcome tab — that's it, VS Code is ready.
Why JDK 17? Spring Boot 3.x requires Java 17 or higher. JDK 17 is the long-term support (LTS) version — stable and widely used in companies.
-
1Download OpenJDK 17
On the archive page, find JDK 17 → download the Windows / x64 zip file.
-
2Run the installer
Accept all defaults. The installer will set JAVA_HOME automatically.
-
3Verify the installation
Open a new terminal (Command Prompt or PowerShell) and run:
java --versionYou should see: openjdk 17.x.x
What is Maven? Maven manages all the libraries your project needs (Spring Boot, JDBC, etc.) — you declare them in pom.xml and Maven downloads them automatically.
-
1Download the Binary zip archive
Download apache-maven-3.9.x-bin.zip and extract it to C:\maven.
-
2Add Maven to PATH
Search Windows → Edit the system environment variables → Environment Variables → Under System variables, find Path → Edit → New → add C:\maven\bin.
-
3Verify
Open a new terminal and run:
mvn --versionYou should see: Apache Maven 3.9.x
Open VS Code → click the Extensions icon in the left sidebar (or press Ctrl+Shift+X) → search and install each extension below.
Required Extensions
AI Coding Assistant (Free)
Get GitHub Copilot free: Sign up at education.github.com/pack with your college email — takes 1–2 days to verify, then Copilot is free while you're a student.
-
1Open the Command Palette
Press Ctrl+Shift+P and type:
Spring Initializr: Create a Maven Project -
2Select Spring Boot version
Choose 3.2.x (latest stable) from the dropdown.
-
3Fill in project details
Group ID: com.campustoai | Artifact: myapp | Packaging: Jar | Java: 17
-
4Add dependencies
Search and select: Spring Web, Spring Data JPA, MS SQL Server Driver, Lombok
-
5Choose a folder and open
Pick a folder (e.g. C:\projects) → VS Code generates the project and opens it automatically.
When Spring Initializr generates your project, it creates a standard folder layout. Every Spring Boot project follows this same structure — learn it once and you'll feel at home in any company's codebase.
main() method that starts the whole application. You rarely touch this file.GET /users, POST /orders, etc.findByEmail().spring.datasource.url=jdbc:...
spring.datasource.username=sa
<groupId>org.springframework...</groupId>
</dependency>
Option A — Spring Boot Dashboard (easiest)
-
1Open Spring Boot Dashboard
Click the Spring Boot icon in the VS Code left sidebar (installed with the extension pack).
-
2Click ▶ Run
Your app appears under Apps — click the run button next to it.
-
3Check the terminal output
Look for: Started MyappApplication in 2.3 seconds — your app is live at http://localhost:8080
Option B — Terminal command
# In the VS Code terminal (Ctrl + `)
mvn spring-boot:runTest it works: Open your browser and go to http://localhost:8080 — if you see a Whitelabel Error Page, Spring Boot is running correctly (it just means no route is mapped yet).
Hot reload: Install the Spring Boot DevTools dependency in your pom.xml and VS Code will restart your app automatically every time you save a file.
| Shortcut | What It Does |
|---|---|
| Ctrl+Shift+P | Command Palette — run any VS Code or Spring command |
| Ctrl+P | Quick open any file by name |
| Ctrl+` | Open / close the integrated terminal |
| Ctrl+Shift+X | Open Extensions marketplace |
| F5 | Start debugging (set breakpoints first) |
| Ctrl+Space | Trigger code suggestions / autocomplete |
| Alt+Shift+F | Auto-format the current file |
| Ctrl+. | Quick fix / import missing class |
| F2 | Rename a variable or method everywhere in the project |
| Ctrl+Shift+F | Search across all files in the project |
Codeium
Install in VS Code. Suggests whole methods and classes as you type. No account needed to start.
100% FreeGitHub Copilot
The best AI code assistant. Free with GitHub Student Developer Pack. Apply with college email.
Free for StudentsClaude / ChatGPT
Use in browser alongside VS Code. Paste your error, ask for explanation, get instant help.
Free TierHow to use AI effectively: Don't just copy code. Ask it to explain what it generated. Ask "why" — that's how you actually learn, and it's what interviewers test.