Demo REST application that uses Spring Boot, MySQL, JUnit and Maven.
To start application run mvn spring-boot:run
command in project root directory. To work properly, database username and password must be specified either in application.properties file or using env variables DB_USER
and DB_PASS
. After it's started it will be available at localhost:8080
.
Creates new client, it accepts following JSON request
{
"id":"0",
"fullName":"name",
"birthday":"yyyy-MM-dd",
"gender":"MALE/FEMALE",
"phones":[phone1,...]
}
Creates new call information, it accepts following JSON request
{
"id": 0,
"clientId": id,
"callersPhone": "callersphone",
"recipientsPhone": "recipientsphone",
"callTime": "yyyy-MM-ddTHH:mm:ssX",
"callDurationMills": durationInMills,
"city": "city"
}
Provides information on a number of calls per each city.
Provides information about the longest call for defined client id and specified date range.