restaurant-order-system is a back end web microservice system, using Java, Spring Boot, Spring Data, Spring Cloud, RabbitMQ and H2.
-
RabbitMQ: process payment asynchronously for preventing a hard handling with too many orders
-
Eureka: services registration and discovery
-
Hystrix: services fall and gracefully degrade
-
restaurant-information-provider : provide restaurant information, item information, order information for other services and do R/W for Database
-
restaurant-information-retrieval: search restaurants by name and items
-
restaurant-items-order: order items clients select
-
restaurant-items-payment: pay items by providing Credit Card information
-
restaurant-payment-processor: confirm payment information and notify client the success or failure of payment
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
Java JDK 1.8
Maven
Docker
Change your current Location to restaurant-order-system
$ cd ../restaurant-order-system
Create executable jar files
$ mvn clean install
Go into target and run jar files, in turn, by above Services' introduction order.
$ java -jar [jar file]
Integration test and MockMvc test run automatically while building jar files.
Use Google App Postman and to test
-
restaurant-information-provider test :
-
set Postman's Http method as Post
-
input url: http://localhost:8080/restaurantInfo
-
upload restaurant information data from restaurantInfo.json
-
return restaurant information
-
-
restaurant-information-retrieval test:
-
set Postman's Http method as Get
-
input url: http://localhost:8088/restaurantName/{name}
-
get items of restaurant's name containing {name}
-
-
restaurant-items-order test:
-
set Postman's Http method as Post
-
input url: http://localhost:9006/items/order/
-
upload clients' requests such as note, account, address from orderInfo.json
-
data will be saved in database and return order information
-
-
restaurant-items-payment test:
-
set Postman's Http method as Post
-
input url: http://localhost:9007/checkout/
-
upload Clients' credit card information from bankInfo.json
-
data will be saved in database and return payment information
-
-
restaurant-payment-processor test:
- check database if orderInfo's isPaid field is set true