Click Here to be taken the deployed application which is hosted on heroku.
- Java JDK 13
- Gradle
The application uses port 8080, and uses Spring Boot, SpingFox Swagger, Junit 5, Lombok, Hystrix and OpenFeign for communication with https://dwp-techtest.herokuapp.com/ api.
http://localhost:8080/
orhttps://dwp-technical-test.herokuapp.com/
Swagger Endpointhttp://localhost:8080/api/users
orhttps://dwp-technical-test.herokuapp.com/api/users
gets all the usershttp://localhost:8080/api/user/{id}
orhttps://dwp-technical-test.herokuapp.com/api/user/{id}
get user by id (replace {id} with user Id, for example:http://localhost:8080/api/user/1
)http://localhost:8080/api/london/users
orhttps://dwp-technical-test.herokuapp.com/api/london/users
get all users that live in londonhttp://localhost:8080/api/london/users/distance/{distance}
orhttps://dwp-technical-test.herokuapp.com/api/london/users/distance/{distance}
get the Users that are in specified distance from centre of London (replace {distance} with the distance value is in miles, for example:http://localhost:8080/api/london/users/distance/60
)
- Open Terminal or Command Line/ PowerShell.
- Navigate to the location where the project has been download or cloned.
- Run
./gradlew clean bootrun
which would run the project. - Go to your web browser and type in localhost:8080 or click here you would be introduced to a swagger documentation outlining the endpoint and the request and response body to use the API.