This repository contains Garage Application with Spring Boot,
Technologies
Dependencies
Pre requirements
Download
Run Tests
Installing
Run Project
End Points
Postman Collection
- Java 11
- Maven
- Spring Boot
- Lombok
- H2 Database
- Lombok
- H2 Database
- JDK 11. version
- Maven 4.0.0 version
- git (optional)
- You can download the project using powershell with command below.
git clone https://github.com/selimsahin1/Garage-SpringBoot.git
.
- You can run test with command below.
mvn clean compile test
- First of all, the command below is need to be run before running the project.
mvn clean install
- The project will be run with command below. Server port is 8080.
java -jar ./target/carfactory-0.0.1-SNAPSHOT.jar
localhost:8080/ticket/create
JSON Request:
{
"color":"blue",
"plate":"34MM0308",
"vehicleType":"CAR"
}
JSON Response:
Allocated one slot.
localhost:8080/ticket/leave
JSON Request:
{
"ticketId": 1
}
JSON Response:
1 slot is empty after removing ticket.
localhost:8080/ticket/status
JSON Response:
[
{
"id": 2,
"slots": [
1
],
"plate": "34MM0308",
"color": "blue",
"vehicleType": "CAR",
"status": "INGARAGE"
},
{
"id": 3,
"slots": [
0
],
"plate": "34MM0308",
"color": "blue",
"vehicleType": "CAR",
"status": "INGARAGE"
},
{
"id": 4,
"slots": [
2
],
"plate": "34MM0308",
"color": "blue",
"vehicleType": "CAR",
"status": "INGARAGE"
}
]
- Postman collection is in the project folder named Garage.postman_collection.json.