← Course Index | VS Code Setup Guide
Free Tools Only
Student Setup Guide

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.

VS Code JDK 17 Spring Boot Maven Free AI ~30 min setup
💻
Step 1
Install Visual Studio Code
The free, lightweight code editor from Microsoft
Visual Studio Code
Windows / macOS / Linux — always free
⬇ Download VS Code
  • 1
    Download the installer

    Go to code.visualstudio.com → click Download for Windows (or your OS).

  • 2
    Run the installer

    Accept defaults. On Windows, tick "Add to PATH" and "Open with Code" — these save time later.

  • 3
    Open VS Code

    Launch it from the Start menu or desktop. You'll see the Welcome tab — that's it, VS Code is ready.

Step 2
Install JDK 17
Java Development Kit — the engine that runs your Java code
💡

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.

OpenJDK 17 (jdk.java.net)
Official OpenJDK builds — free, direct from Oracle's open-source archive
⬇ Download JDK 17
  • 1
    Download OpenJDK 17

    On the archive page, find JDK 17 → download the Windows / x64 zip file.

  • 2
    Run the installer

    Accept all defaults. The installer will set JAVA_HOME automatically.

  • 3
    Verify the installation

    Open a new terminal (Command Prompt or PowerShell) and run:

    java --version

    You should see: openjdk 17.x.x

Step 3
Install Maven
Build tool that downloads dependencies and packages your app
💡

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.

Apache Maven 3.9+
Free, open-source build tool — industry standard for Java projects
⬇ Download Maven
  • 1
    Download the Binary zip archive

    Download apache-maven-3.9.x-bin.zip and extract it to C:\maven.

  • 2
    Add Maven to PATH

    Search Windows → Edit the system environment variables → Environment Variables → Under System variables, find Path → Edit → New → add C:\maven\bin.

  • 3
    Verify

    Open a new terminal and run:

    mvn --version

    You should see: Apache Maven 3.9.x

🧩
Step 4
Install VS Code Extensions
Extensions add Java and Spring Boot support to VS Code

Open VS Code → click the Extensions icon in the left sidebar (or press Ctrl+Shift+X) → search and install each extension below.

Required Extensions

Extension Pack for Java
Java language support, debugger, Maven integration, test runner — all in one pack.
Required
🍃
Spring Boot Extension Pack
Spring Boot Dashboard, live beans view, run/debug Spring apps directly from VS Code.
Required
🌱
Spring Initializr Java Support
Generate a new Spring Boot project from inside VS Code without visiting a website.
Required
🔵
SQL Server (mssql)
Connect to Azure SQL Database, run queries, and browse tables from VS Code.
Required

AI Coding Assistant (Free)

🤖
Codeium
Free AI code completion — no student ID needed. Suggests whole methods as you type.
100% Free
🐙
GitHub Copilot
Best-in-class AI assistant. Free for students via GitHub Student Developer Pack.
Free with Student Pack
🎓

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.

🌱
Step 5
Create Your First Spring Boot Project
Use Spring Initializr inside VS Code — no browser needed
  • 1
    Open the Command Palette

    Press Ctrl+Shift+P and type:

    Spring Initializr: Create a Maven Project
  • 2
    Select Spring Boot version

    Choose 3.2.x (latest stable) from the dropdown.

  • 3
    Fill in project details

    Group ID: com.campustoai  |  Artifact: myapp  |  Packaging: Jar  |  Java: 17

  • 4
    Add dependencies

    Search and select: Spring Web, Spring Data JPA, MS SQL Server Driver, Lombok

  • 5
    Choose a folder and open

    Pick a folder (e.g. C:\projects) → VS Code generates the project and opens it automatically.

🌱
Next: Deep Dive
Spring Boot Basics
Understand Group ID, Artifact, Packaging, annotations, REST controllers & more
Step 6
Understand the Project Structure
Where everything lives in a Spring Boot project

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.

EXPLORER
📁 myapp
📁 src
📁 main
📁 java / com / campustoai / myapp
☕ MyappApplication.java
📁 controller
📁 service
📁 repository
📁 resources
⚙️ application.properties
📁 test
📄 pom.xml
MyappApplication.java
The entry point. Contains the main() method that starts the whole application. You rarely touch this file.
controller/
Handles incoming HTTP requests. This is where you define your REST API endpoints — GET /users, POST /orders, etc.
service/
Contains your business logic — calculations, rules, decisions. The controller calls the service. Keep logic here, not in the controller.
repository/
Talks to the database. Spring Data JPA generates the SQL for you — just declare an interface and methods like findByEmail().
⚙️ application.properties
Your app's configuration file. Set the database URL, port number, passwords, and feature flags here — all in one place without touching Java code.
server.port=8080
spring.datasource.url=jdbc:...
spring.datasource.username=sa
📦 pom.xml
Maven's shopping list. Declare which libraries you need (Spring Web, JPA, Azure SQL) and Maven downloads them automatically. You never copy JAR files manually.
<dependency>
  <groupId>org.springframework...</groupId>
</dependency>
How a request flows through the layers
🌐
Browser / App
HTTP Request
🎯
Controller
Receives request
⚙️
Service
Business logic
🗄️
Repository
Database query
Response
JSON back
Keep each layer focused on one job — this is called Separation of Concerns and it's how professional teams write maintainable code.
▶️
Step 7
Run the Application
Two ways to start your Spring Boot app

Option A — Spring Boot Dashboard (easiest)

  • 1
    Open Spring Boot Dashboard

    Click the Spring Boot icon in the VS Code left sidebar (installed with the extension pack).

  • 2
    Click ▶ Run

    Your app appears under Apps — click the run button next to it.

  • 3
    Check 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:run

Test 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.

⌨️
Step 8
Must-Know VS Code Shortcuts
Learn these on day one — they save hours every week
ShortcutWhat It Does
Ctrl+Shift+PCommand Palette — run any VS Code or Spring command
Ctrl+PQuick open any file by name
Ctrl+`Open / close the integrated terminal
Ctrl+Shift+XOpen Extensions marketplace
F5Start debugging (set breakpoints first)
Ctrl+SpaceTrigger code suggestions / autocomplete
Alt+Shift+FAuto-format the current file
Ctrl+.Quick fix / import missing class
F2Rename a variable or method everywhere in the project
Ctrl+Shift+FSearch across all files in the project
Bonus
Free AI Tools for Students
Use AI to write, explain, and debug your code faster
🤖

Codeium

Install in VS Code. Suggests whole methods and classes as you type. No account needed to start.

100% Free
🐙

GitHub Copilot

The best AI code assistant. Free with GitHub Student Developer Pack. Apply with college email.

Free for Students
💬

Claude / ChatGPT

Use in browser alongside VS Code. Paste your error, ask for explanation, get instant help.

Free Tier
💡

How 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.