A restful web service for the Classic Models sample database. A copy of the database can be found here.
Endpoint | Request Type | Description |
---|---|---|
{host}/api/orders | GET | Retuns all ordrers with order details |
{host}/api/orders/{id} | GET | Returns one order with details by order number |
{host}/api/orders/{ordernumber}/orderdetails | GET | Returns order details for one order |
{host}/api/orders | POST | Creates a new order |
{host}/api/orders/{id} | PUT | Updates an order |
{host}/api/orders/{id} | DELETE | Deletes an order and its details by order number |
Package the project into a single jar file.
mvn package
Execute the jar file from the command line.
java -jar ClassicModelsRestApi-0.0.1-SNAPSHOT.jar
You should now see the spring initialization take place.
The API can be accessed at
localhost:8080/api/...
This project is set up to be deployed as a docker container on Microsoft Azure. A docker file has been configured for a .jar based build.
Build the Docker image
docker build --tag=yourregistry.azurecr.io/classicmodelsapi:latest .
Run a container locally for testing
docker run -p 5000:8080 yourregistry.azurecr.io/classicmodelsapi:latest
Push the image to your Azure Container Registry
docker push yourregistry.azurecr.io/classicmodelsapi:latest
The azure portal can now be used to deploy the container into a web app!
- Spring Boot - Micro Service framework
- Hibernate - Object relational mapping
- MySQL - Database
- Maven - Dependency Management
- Azure - Cloud Services
- Docker - Container platform
- Andrew Moss - Creator - agmoss
This project is licensed under the MIT License - see the LICENSE.md file for details