A very simple demo that models users stored in an ElasticSearch backend, exposed via Spring Data REST along with an integration test.
Use ./mvnw clean package
to run the (rather non-existant) unit tests, integration tests
and to create the JAR and docker image.
(see also: Building a RESTful Web Service)
Create an user:
curl -i -X POST -H "Content-Type:application/json" -d '{"email": "[email protected]", "firstName": "foo", "lastName": "bar"}' http://localhost:8080/users
List users:
curl http://localhost:8080/users
Create/Update an user:
curl -i -X PUT -H "Content-Type:application/json" -d '{"email": "[email protected]", "firstName": "car", "lastName": "bar"}' http://localhost:8080/users/[email protected]
Delete an user:
curl -i -X DELETE http://localhost:8080/users/[email protected]