Files
animal/README.md
Scaffolder e8500e3093
All checks were successful
Build and Push to ACR / Build and Push (push) Successful in 1m42s
initial commit
Change-Id: I9a212410892986980114d61a6844b2a6e2c61f38
2026-03-27 15:48:35 +00:00

1.5 KiB

animals

animals

Runtime: Java 17 · Spring Boot 3.2
Owner: group:default/demo-admins
Platform: Humanitec · Project cjot-platform

Quick Start

Prerequisites

  • JDK 17+
  • Maven 3.9+

Run locally

mvn spring-boot:run

The service listens on http://localhost:8080.

Endpoints

Method Path Description
GET /api/items List all items
POST /api/items Create a new item
GET /api/items/{id} Get item by ID
PUT /api/items/{id} Update item
DELETE /api/items/{id} Delete item
GET /actuator/health Health check
GET /actuator/prometheus Prometheus metrics

Example requests

# Create an item
curl -X POST http://localhost:8080/api/items \
  -H "Content-Type: application/json" \
  -d '{"name": "Widget", "description": "A demo widget"}'

# List all items
curl http://localhost:8080/api/items

Build

mvn package -DskipTests
java -jar target/*.jar

Container

docker build -t animals:dev .
docker run -p 8080:8080 animals:dev

CI/CD

Push to main triggers:

  1. build-push.yml — Maven build → ACR push
  2. deploy-humanitec.ymlhumctl score deploy to ``