This project provides next endpoints:
- registering a drone;
- check drone battery level for a given drone;
- loading a drone with medication items;
- checking loaded medication items for a given drone;
- checking available drones for loading;
Application initializes default drones and medications in database with first start.
- java 11
- maven
- docker (or instance of PostgreSQL)
You can build a project with tests:
./mvnw clean install
or without tests:
./mvnw clean install -Dmaven.test.skip=true
- If you already have instance of PostgreSQL just create database with name drone_communication set up next environmental variables:
- datasourceUrl - database jdbc url
- datasourceUsername - db user
- datasourcePassword - db user's password
you can set each environmental variable with:
export datasourceUrl=jdbc:postgresql://localhost:5432/drone_communication
- OR if you don't have installed PostgreSQL instance just run next command from the root folder of application:
docker-compose -f ./docker/docker-compose.yaml up -d
After preparing database run command from the root folder of our application:
mvn spring-boot:run
swagger available at: http://localhost:8080/swagger-ui.html