DEV Community

Cover image for πŸš€ Build and Run a Java + HTML Portfolio Website Using Spring Boot and Maven
Chaitanya Chopde
Chaitanya Chopde

Posted on

πŸš€ Build and Run a Java + HTML Portfolio Website Using Spring Boot and Maven

✍️ Written by: Chaitanya Chopde
πŸ“«chaitanyachopde14@gmail.com
Inspired By: @devsyncin

🌟 Introduction

Creating a professional portfolio website is one of the best ways to showcase your skills as a developer. In this tutorial, I’ll walk you through how to build and run a full-featured portfolio website using:

βœ… Java (Spring Boot backend)

βœ… HTML, CSS, JavaScript frontend

βœ… Maven for project management

βœ… VS Code as the IDE

By the end, you’ll have a fully functional portfolio with a working contact form, animations, and a clean modern UI.

🧰 Tools & Tech Stack

  • Java 17+
  • Spring Boot 3.x
  • Maven
  • HTML/CSS/JavaScript
  • VS Code
  • Chocolatey (optional)
  • Windows OS

πŸ”§ Step 1: Install Prerequisites

βœ… Install Java 17
Using Chocolatey (fastest method):

Image description
βœ… Install Maven

Image description

βœ… Verify Java & Maven
Open PowerShell or CMD:

Image description

πŸ“ Step 2: Project Structure

Image description

πŸ–ΌοΈ Step 3: Frontend Code

index.html

Image description

script.js

Image description

βš™οΈ Step 4: Backend with Spring Boot

ContactController.java

Image description

PortfolioBackendApplication.java

Image description

πŸš€ Step 5: Run the Website

πŸ’» Backend (Java)
Open backend folder β†’ Terminal:

Image description
Backend runs at:
http://localhost:8080

🌐 Frontend (HTML)

Use Live Server in VS Code:

Right-click index.html β†’ "Open with Live Server"
Form submits to backend β†’ You get a success alert βœ…

πŸ§ͺ Testing

  • Run backend
  • Run frontend
  • Submit contact form β†’ Check terminal logs
  • πŸŽ‰ Your full-stack portfolio is working!

Image description

πŸ› οΈ Common Errors

  1. ❌ mvn not recognized Maven isn’t in your PATH

Fix: Add C:\path\to\maven\bin to Environment Variables β†’ Path

  1. ❌ CORS Error Add @CrossOrigin(origins = "*") in your controller

🌐 Future Upgrades

  1. Add Resume Upload
  2. Dark/Light Theme Toggle
  3. Database for storing messages
  4. Deploy backend (Render) and frontend (Vercel)

πŸ™Œ Final Notes

Building your own portfolio from scratch using Java + HTML is a great learning experience. You learn how frontend talks to backend, how to build REST APIs, and how to deploy projects.

πŸ”– Inspired by @devsyncin

Special thanks to @devsyncin community for inspiring clean code, full-stack clarity, and real-world deployment skills.

Top comments (0)