Your objective is to build an incredible experience for a simple rest service to retrieve user's information, while at the same time impressing us with how simple and clean your code is.
Please utilize this clean sprint boot project. Run it by typing ./mvnw
in command line.
We receive many submissions daily, yours needs to stand out. We'd love to be impressed by the coding style, by the unit test, and by the little touches that make it slick.
####### install apache maven
. ~/.bash_profile
mvn spring-boot:run
-
Endpoint A: by typing url http://localhost:8080/users in a browser, we expect a list of users returning in JSON format. E.g., [ { "id": 1, "name":"John", "age":31, "city":"New York" }, { "id": 2, "name":"Doe", "age":22, "city":"Vancouver" } ]
-
Endpoint B: by typing url http://localhost:8080/user/2 in a browser, we expect a user with id=2 returning in JSON format. E.g., { "id": 2, "name":"Doe", "age":22, "city":"Vancouver" }
-
Unit Test: we expect to see unit tests for above two endpoints.
-
Optional: Uniform error handling, your code should also handle potential errors.
-
Optional: Security, in most cases, a token is required to authorize the access of an endpoint. To make it happen, we expect to see a simple and general security control.
-
We were able to run your code using
./mvnw
-
Tasks completed - are the tasks well completed
-
Code quality - is your code clean, simple, readable, well designed
-
Unit test - the endpoint and service are well tested
-
Errors - handle errors gracefully
-
Do not place your code on GitHub or any other source version control platform.
-
Please email us a zip file, that we can unzip
-
Send your submission to
zheng@omegasys.eu
, with subjectjava-coding-challenge
.