Simple Spring Boot REST API for creating, updating, and finding devices by serial number and machine code.
Method Type | Path | Description |
---|---|---|
GET | /devicemanager/devices | getAllDevices |
POST | /devicemanager/devices | addDevice |
GET | /devicemanager/devices/machineCode/{machineCode} | findByMachineCode |
PUT | /devicemanager/devices/machineCode/{machineCode} | updateByMachineCode |
GET | /devicemanager/devices/serialNumber/{serialNumber} | findBySerialNumber |
PUT | /devicemanager/devices/serialNumber/{serialNumber} | updateBySerialNumber |
If you use an IDE, I'm assuming you won't need instructions for how to run it...
These instructions will be for running from the command line.
- Clone repository
- From the command line, navigate to project root folder
- Run Maven install
mvn install
- Start Spring Boot app (application runs on portt 8080 by default)
mvn spring-boot:run
After starting the API, navigate to http://localhost:8080/devicemanager/swagger-ui/ to test the API using Swagger.
You should see something like this: