Initial commit: demo-java-api with CI/CD
Some checks failed
Build & Deploy Java API / build (push) Has been cancelled

This commit is contained in:
gitea-ci
2026-07-22 01:06:34 +08:00
commit 74a57f251e
9 changed files with 355 additions and 0 deletions

44
README.md Normal file
View File

@@ -0,0 +1,44 @@
# 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
```bash
./mvnw spring-boot:run
```
## Build Docker Image
```bash
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
```