This is sample 'Motor depot' web application.
- Programming Language: Java
- Core Framework: Spring Boot
- Build System: Maven
- Control System: Git
- License: Apache license, version 2.0
- Automated Testing:
- Log: Log4j 2
- Database: H2
- Template Engine: Thymeleaf
- JDK 11+
- Git 2.25.1+
- Apache Maven 3.6.3+
$ git clone https://github.com/Brest-Java-Course-2021-2/Vladimir-Petranovski-MD-SpringBoot
$ cd Vladimir-Petranovski-MD-SpringBoot
$ mvn clean install
$ mvn clean test
$ mvn clean verify
$ mvn site
$ mvn site:stage
Open in browser: ./target/staging/index.html
To start Rest using Maven Jetty plugin use:
$ cd rest-app
$ mvn jetty:run
To start Web using Maven Jetty plugin use:
$ cd web-app
$ mvn jetty:run
$ curl --request GET 'http://localhost:8088/version'
$ curl --request GET 'http://localhost:8088/drivers_dto'
$ curl --request GET 'http://localhost:8088/drivers_dto' | json_pp
$ curl --request GET 'http://localhost:8088/drivers' | json_pp
$ curl --request GET 'http://localhost:8088/drivers/1' | json_pp
$ curl --request POST 'http://localhost:8088/drivers' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data-raw '{
"driverName": "TOLIA",
"driverDateStartWork": 1214677490.532700000,
"driverSalary": 980
}'
$ curl --request PATCH 'http://localhost:8088/drivers/3' \
--header 'Content-Type: application/json' \
--data-raw '{
"driverName": "SERGEI",
"driverDateStartWork": 1014677990.532700000,
"driverSalary": 470
}'
$ curl --request DELETE 'http://localhost:8088/drivers/3/delete-driver'
$ curl --request GET 'http://localhost:8088/cars' | json_pp
$ curl --request GET 'http://localhost:8088/cars/1' | json_pp
$ curl --request POST 'http://localhost:8088/cars' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data-raw '{
"carModel": "GIGULI",
"driverId": 2
}'
$ curl --request PATCH 'http://localhost:8088/cars/3' \
--header 'Content-Type: application/json' \
--data-raw '{
"carModel": "AUDI",
"driverId": 1
}'
$ curl --request DELETE 'http://localhost:8088/cars/3/delete-car'