This is sample 'Human Resources' Spring boot web application.
- JDK 11
- Apache Maven
- angular-app - a web app based on NodeJs + Angular, uses rest-server
- dao - a layer for working with one of the database instance from db
- db - diff configurations (schema + init scripts) to up
prod|test
instance of the database - documentation - a documentation
- model - todo: db + ui
- rest-client - spring beans based on
RestTemplate
- rest-server - a spring boot app (REST API)
- service - spring beans that use dao for direct connection to the database db
- web-app - a spring boot app (UI) that uses REST API through rest-client
mvn clean install
To start Rest server:
java -jar ./rest-app/target/rest-app-1.0-SNAPSHOT.jar
curl --request GET 'http://localhost:8088/version'
curl --request GET 'http://localhost:8088/department-dtos'
Pretty print json:
curl --request GET 'http://localhost:8088/department-dtos' | json_pp
curl --request GET 'http://localhost:8088/departments' | json_pp
curl --request GET 'http://localhost:8088/departments/1' | json_pp
curl --request POST 'http://localhost:8088/departments' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data-raw '{
"departmentName": "JAVA"
}'
curl --request PUT 'http://localhost:8088/departments' \
--header 'Content-Type: application/json' \
--data-raw '{
"departmentId": 4,
"departmentName": "Java"
}'
curl --request DELETE 'http://localhost:8088/departments/4'