gitea-ci 782ae3240d
Some checks failed
Build & Deploy Java API / build (push) Failing after 40s
fix: build JAR locally, use minimal JRE image
2026-07-22 01:23:14 +08:00

Demo Java API

A simple Spring Boot API for CI/CD demonstration.

API Endpoints

Endpoint Method Description
/ GET Returns API info with timestamp
/healthz GET Health check endpoint

Local Development

./mvnw spring-boot:run

Build Docker Image

docker build -t demo-java-api .
docker run -p 8080:8080 demo-java-api

Project Structure

demo-java-api/
├── pom.xml                              # Maven config
├── Dockerfile                           # Multi-stage Docker build
├── src/
│   └── main/
│       ├── java/com/example/demo/
│       │   └── DemoJavaApiApplication.java
│       └── resources/
│           └── application.properties
├── deploy/helm/
│   ├── Chart.yaml
│   ├── values.yaml
│   └── templates/
│       └── deployment.yaml
└── .gitea/workflows/
    └── build.yml                       # Gitea CI workflow
Description
Demo Java API for CI/CD testing
Readme 42 KiB
Languages
Java 63.2%
Dockerfile 36.8%