Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mfvanek/salary-calc
Demo app for salary calculation (Spring Boot)
https://github.com/mfvanek/salary-calc
checkstyle hacktoberfest jacoco java java-21 jpa junit5 maven pmd postgresql spotbugs spring-boot spring-boot-3 swagger
Last synced: 3 months ago
JSON representation
Demo app for salary calculation (Spring Boot)
- Host: GitHub
- URL: https://github.com/mfvanek/salary-calc
- Owner: mfvanek
- License: apache-2.0
- Created: 2020-08-31T11:18:26.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2024-10-13T16:16:04.000Z (3 months ago)
- Last Synced: 2024-10-17T00:14:18.177Z (3 months ago)
- Topics: checkstyle, hacktoberfest, jacoco, java, java-21, jpa, junit5, maven, pmd, postgresql, spotbugs, spring-boot, spring-boot-3, swagger
- Language: Java
- Homepage:
- Size: 424 KB
- Stars: 6
- Watchers: 2
- Forks: 3
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Security: SECURITY.md
Awesome Lists containing this project
README
# salary-calc
Demo app for salary calculation (Spring Boot)[![Java CI](https://github.com/mfvanek/salary-calc/actions/workflows/tests.yml/badge.svg)](https://github.com/mfvanek/salary-calc/actions/workflows/tests.yml)
[![Total lines](https://tokei.rs/b1/github/mfvanek/salary-calc)](https://github.com/mfvanek/salary-calc)
[![Files](https://tokei.rs/b1/github/mfvanek/salary-calc?category=files)](https://github.com/mfvanek/salary-calc)[![Bugs](https://sonarcloud.io/api/project_badges/measure?project=mfvanek_salary-calc&metric=bugs)](https://sonarcloud.io/summary/new_code?id=mfvanek_salary-calc)
[![Vulnerabilities](https://sonarcloud.io/api/project_badges/measure?project=mfvanek_salary-calc&metric=vulnerabilities)](https://sonarcloud.io/summary/new_code?id=mfvanek_salary-calc)
[![Code Smells](https://sonarcloud.io/api/project_badges/measure?project=mfvanek_salary-calc&metric=code_smells)](https://sonarcloud.io/summary/new_code?id=mfvanek_salary-calc)
[![Lines of Code](https://sonarcloud.io/api/project_badges/measure?project=mfvanek_salary-calc&metric=ncloc)](https://sonarcloud.io/summary/new_code?id=mfvanek_salary-calc)
[![Coverage](https://sonarcloud.io/api/project_badges/measure?project=mfvanek_salary-calc&metric=coverage)](https://sonarcloud.io/summary/new_code?id=mfvanek_salary-calc)## Requirements
Java 21+
Spring Boot 3.3+## API
### Actuator
[Swagger UI](http://localhost:8090/actuator/swagger-ui)
[Health](http://localhost:8090/actuator/health)### Endpoints
```shell
curl http://localhost:8080/api/employee/dcffa631-595a-44e6-8f8c-1c077de895bf
``````shell
curl -i -X POST -d "{\"firstName\": \"John\",\"lastName\": \"Wick\",\"standardHoursPerDay\": 8,\"salaryPerHour\": 5000}" http://localhost:8080/api/employee -H "Content-Type: application/json"
``````shell
curl http://localhost:8080/api/employee/all
```## Run locally
```shell
mvn spring-boot:run -Dspring-boot.run.profiles=extern
```## Run in Docker
### Build image
```shell
mvn clean spring-boot:build-image -DskipTests -DskipSpotbugs=true
```### Build native image
**_Unfortunately, built application doesn't start in container_**
```shell
mvn clean spring-boot:build-image -DskipTests -DskipSpotbugs=true -Pnative
```### Docker Compose
#### Start
```shell
docker-compose --project-name="salary-calc" up -d
```#### Stop
```shell
docker-compose --project-name="salary-calc" down
```