Sign inSign up

deepaksorthiya/spring-boot-getting-start

By deepaksorthiya

โ€ขUpdated 3 days ago

Spring Boot Starter Project

Languages & frameworks
0

25

deepaksorthiya/spring-boot-getting-start repository overview

โ Spring Boot Starter Project

JVM Maven Build โ  GraalVM Maven Build โ  Docker โ  Spring Boot โ 

โ Live Demo

TBD


โ ๐Ÿ“‘ Table of Contents


โ ๐Ÿš€ Overview

A modern Spring Boot starter project with REST API, JPA, Actuator, Docker, and Kubernetes Helm support.


โ ๐Ÿš€ Features

  • RESTful API with CRUD endpoints
  • Spring Data JPA (H2 in-memory DB)
  • Actuator endpoints enabled
  • Docker & multi-stage build
  • Kubernetes manifests & Helm chart
  • GitHub Actions CI/CD

โ ๐Ÿ“ฆ Requirements

  • Git 2.51+
  • Java 25
  • Maven 3.10+
  • Spring Boot 3.5.16
  • (Optional)Docker Desktop (tested on 4.50+)
  • (Optional) Minikube/Helm for Kubernetes

โ ๐Ÿ› ๏ธ Getting Started

โ 1. Clone the Repository
git clone https://github.com/deepaksorthiya/spring-boot-getting-start.git
cd spring-boot-getting-start
โ 2. Start Docker
  • this command will start all required services to start application
docker compose up
โ 3. Build the Project
./mvnw clean package -DskipTests
  • OR for native build run
./mvnw clean native:compile -Pnative
โ 4. Run the Project
./mvnw spring-boot:run
  • OR Jar file
java -jar .\target\spring-boot-getting-start-0.0.1-SNAPSHOT.jar
  • OR Run native image directly
target/spring-boot-getting-start
โ 5. (Optional) Build Docker Image (docker should be running)
./mvnw clean spring-boot:build-image -DskipTests
  • OR To create the native container image, run the following goal:
./mvnw clean spring-boot:build-image -Pnative -DskipTests
  • OR using dockerfile
docker build --progress=plain --no-cache -f <dockerfile> -t deepaksorthiya/spring-boot-getting-start .
  • OR Build Using Local Fat Jar In Path target/spring-boot-getting-start-0.0.1-SNAPSHOT.jar
docker build --build-arg JAR_FILE=target/spring-boot-getting-start-0.0.1-SNAPSHOT.jar -f Dockerfile.jvm --no-cache --progress=plain -t deepaksorthiya/spring-boot-getting-start .
  • OR if above not work try below command

you should be in jar file path to work build args

cd target
docker build --build-arg JAR_FILE=spring-boot-getting-start-0.0.1-SNAPSHOT.jar -f ./../Dockerfile.jvm --no-cache --progress=plain -t deepaksorthiya/spring-boot-getting-start .
Dockerfile NameDescription
Dockerfileโ multi stage docker file with Spring AOT and JDK24+ AOT Cache
Dockerfile.native-multiโ multi stage using graalvm native image micro linux image
โ 6. (Optional) Running On Docker
docker run -p 8080:8080 --name spring-boot-getting-start deepaksorthiya/spring-boot-getting-start:latest
โ 7. (Optional)Run on Local minikube Kubernetes using Helm Chart
cd helm
helm create spring-boot-getting-start
helm lint spring-boot-getting-start
helm install spring-boot-getting-start --values=spring-boot-getting-start/values.yaml spring-boot-getting-start
helm install spring-boot-getting-start spring-boot-getting-start
helm uninstall spring-boot-getting-start

โ ๐Ÿงช Testing

โ Postman API Collection

TBD

โ Rest API Endpoints

TBD

โ Run Unit-Integration Test Cases
./mvnw clean test

To run your existing tests in a native image, run the following goal:

./mvnw test -PnativeTest

โ ๐Ÿงน Cleanup

docker compose down -v

โ ๐Ÿ“š Reference Documentation

For further reference, please consider the following sections:


Happy Coding! ๐Ÿš€

Tag Summary

No tags have been pushed to this repository yet.