This is a Spring Boot application that provides a RESTful API for a hypothetical Lanchonete (Snack Bar). The application is written in Java and uses SQL for data persistence.
- Create a new product
- Add a product to an order
- Remove a product from an order
- Get the total price of an order
- Close an order
- Get the total price of a batch of orders
- Get all orders
- Get all products
- Clone the repository
- Navigate to the project directory
- Run the application using Maven:
mvn spring-boot:run
POST /orders/create
: Create a new orderPOST /orders/add-product
: Add a product to an orderPOST /orders/remove-product
: Remove a product from an orderGET /orders/total/{order_id}
: Get the total price of an orderPOST /orders/close
: Close an orderPOST /orders/total_batch
: Get the total price of a batch of productsGET /orders/all
: Get all orders
POST /products/create
: Create a new productGET /products/all
: Get all products
The project includes unit tests for the service layer. Run the tests with the following command: mvn test
https://lanchoneteapi-production.up.railway.app/swagger-ui.html