App to simulate ordering when using aggregate functions in SQL.
This Spring Boot application simulates the management of quotations, where each quotation has a list of products and groups. The application requires Java 17, uses a Gradle Wrapper, an H2 database, and Hibernate.
- Java 17
- Gradle Wrapper
To run the application, ensure you have Java 17 installed. If not, download it from Oracle's Official Website.
Upon setting up Java 17, follow these simple steps:
-
Clone the repository to your computer.
-
Open your terminal and navigate to the project root directory.
-
Run the Spring Boot application using the Gradle Wrapper:
./gradlew bootRun
Note: Windows users should use
gradlew.bat
instead of./gradlew
.
This command starts the application on port 8080 of your localhost.
The application has the following endpoint:
GET /quotations
- Retrieves all quotations, sorted by group and products. The products are sorted in ascending order and separated by commas. Access the endpoint at http://localhost:8080/quotations
The application comes with an H2 in-memory database. Hibernate, the ORM layer, enables interaction with the H2 database.
This application models a real-world scenario where quotations are linked to various products in different groups. The main components are Quotations and Products, with products organized by groups.
The "/quotations" endpoint displays all quotations, sorted by group and the products they contain. Products are listed in ascending orde and separated by commas.