Spring Boot

Capstone – Article 1: Project Setup & Dependency Selection (Expense Tracker)

By Utility Zone · 2026-01-27T18:31:14.581297

1. Introduction

This is the first coding step of the Expense Tracker capstone.

The goal of this article is simple:

  • Create a clean Spring Boot project
  • Choose only the right dependencies
  • Run the application successfully

A strong foundation here avoids pain later.


2. Creating the Spring Boot Project

Use Spring Initializr:

https://start.spring.io

Project Configuration

  • Project: Maven
  • Language: Java
  • Spring Boot: 3.x.x
  • Group: com.example
  • Artifact: expense-tracker
  • Name: expense-tracker
  • Packaging: Jar
  • Java: 17

3. Selecting Dependencies (Very Important)

Select only these dependencies:

Required Now

  • Spring Web
  • Spring Data JPA
  • Spring Security
  • Validation
  • H2 Database
  • Spring Boot Actuator
  • Lombok (optional but recommended)

👉 Do NOT add Swagger, JWT, Docker yet — we’ll add them phase by phase.


4. Generate and Import Project

  1. Click Generate
  2. Extract the ZIP
  3. Open the project in:
    • IntelliJ IDEA or
    • VS Code

Wait for Maven dependencies to download.


5. Verify Project Structure

You should see:

expense-tracker
 ├── src/main/java
 │   └── com/example/expensetracker
 │       └── ExpenseTrackerApplication.java
 ├── src/main/resources
 │   └── application.properties
 ├── pom.xml

Do not change anything yet.


6. First Application Run

Run from IDE

Run:

ExpenseTrackerApplication.java

Or run from terminal

mvn spring-boot:run

7. Verify Successful Startup

In logs, look for:

Started ExpenseTrackerApplication in X seconds

Open browser:

http://localhost:8080

Seeing Whitelabel Error Page is expected and good.


8. Minimal Configuration

Add to application.properties:

spring.application.name=expense-tracker
server.port=8080

Restart the app and verify.


9. Git Initialization

Inside project folder:

git init
git add .
git commit -m "Initial Spring Boot project setup"

This commit is important — keep it clean.


10. Common Beginner Mistakes

❌ Adding too many dependencies early
❌ Using wrong Java version
❌ Ignoring Maven errors
❌ Editing generated files blindly


11. What You Should Have Now

At this point:

  • Project builds successfully
  • App starts without errors
  • Git repo initialized
  • Clean foundation ready

12. What’s Next?

➡ Capstone – Article 2: Database Configuration & User Entity

  • Configure H2 database
  • Create User entity
  • JPA mappings

Type Next when you’re ready to continue 🚀