// readme

salary-calc

Demo app for salary calculation (Spring Boot)

Requirements

  • Java 25+
  • Spring Boot 4.0+

API

Actuator

Endpoints

curl http://localhost:8080/api/employee/dcffa631-595a-44e6-8f8c-1c077de895bf
curl -i -X POST -d "{\"firstName\": \"John\",\"lastName\": \"Wick\",\"standardHoursPerDay\": 8,\"salaryPerHour\": 5000}" http://localhost:8080/api/employee -H "Content-Type: application/json"
curl http://localhost:8080/api/employee/all

Run locally

With database from Testcontainers

mvn spring-boot:test-run -Dspring-boot.run.jvmArguments="-Duser.timezone=Europe/Moscow"

You can also run LocalDevApplication (in test sources) directly from your IDE.

With external database

mvn spring-boot:run -Dspring-boot.run.profiles=extern -Dspring-boot.run.jvmArguments="-Duser.timezone=Europe/Moscow"

Run in Docker

Build image

mvn clean spring-boot:build-image -DskipTests -DskipSpotbugs=true

Build native image

mvn clean spring-boot:build-image -DskipTests…