This Spring Web MVC application is used to generate random tomato
orders and to handle requests for them.
The application handles GET requests on /orders/data?size=<X>
endpoint, where the size parameter is optional. The response is in the following format:
[{
"id": <randomly generated UUID>,
"tomatoes": <randomly generated Integer from 1 to 2000>,
“provider": <randomly generated String, one of the following:
"Heinz", "Hunt's", "Del Monte", "Le Ol' Granma">,
“timestamp": <randomly-generated long from the beginning of this year to today>
}, ... ]
- Install Java 8 available at
http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html - Clone the project from
https://github.com/ststdimov/TomatoOrdersApp.git
-
Open the terminal console and navigate to the project root. Type
mvnw spring-boot:runto start the application. The web application is available athttp://localhost:8080 -
Another option is to import the project in the Spring Tool Suite (available at
https://spring.io/tools) and run it as Java application
- Navigate to the root application directory and from console execute
mvnw test - Another approach is to locate the package
com.musala.orders.applicationinsrc/test/javafolder. Execute each of the files as JUnit Test by using STS (Spring Tool Suite) or other suitable IDE