Skip to content

liantan625/Vending-Machine

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Vending Machine 🏪

A project for learning Java Spring Boot basics through building a vending machine application.

📋 Description

This is a learning project that implements a vending machine system using Spring Boot. It demonstrates fundamental concepts including REST APIs, JPA data persistence, and dependency injection.

🛠️ Technologies Used

  • Java 17
  • Spring Boot 4.0.0
    • Spring Boot Starter Web MVC
    • Spring Boot Starter Data JPA
  • H2 Database (in-memory database)
  • Lombok (for reducing boilerplate code)
  • Maven (dependency management)

📁 Project Structure

vending-machine/
├── src/
│   ├── main/
│   │   ├── java/
│   │   └── resources/
│   └── test/
├── pom.xml
├── mvnw
└── mvnw.cmd

🚀 Getting Started

Prerequisites

  • Java 17 or higher
  • Maven (or use the included Maven wrapper)

Installation

  1. Clone the repository:
git clone https://github.com/liantan625/Vending-Machine.git
cd Vending-Machine
  1. Build the project:
./mvnw clean install
  1. Run the application:
./mvnw spring-boot:run

The application will start on http://localhost:8080

🎯 Features

  • RESTful API endpoints
  • JPA entity management
  • H2 in-memory database integration
  • Lombok annotations for cleaner code

🧪 Testing

Run the tests using:

./mvnw test

📚 Learning Objectives

This project covers:

  • Setting up a Spring Boot application
  • Creating REST controllers
  • Working with Spring Data JPA
  • Database configuration and management
  • Using Lombok for code simplification
  • Maven project structure and dependency management

🤝 Contributing

This is a personal learning project, but suggestions and feedback are welcome!

📄 License

This project is open source and available for educational purposes.

👤 Author

liantan625


Built with ☕ while learning Spring Boot

About

a project for me to learn java spring boot basics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published