This is a simple example of writing java micro services based on Eclipse MicroProfile.
Eclipse MicroProfile version 1.1 with Payara Micro runtime is used in this example.
MicroProfile 1.1 consists of JAX-RS 2.0, CDI 1.2, JSON-P 1.0 and Eclipse Config 1.0 API.
Project uses maven to manage build lifecycle.
To package the Payara microbundle, run below maven command:
mvn clean install payara-micro:bundle
Service exposes below JAX RS Endpoints -
GET http://localhost:8080/microprofile-service-example-0.0.1-SNAPSHOT/api/books POST http://localhost:8080/microprofile-service-example-0.0.1-SNAPSHOT/api/books GET http://localhost:8080/microprofile-service-example-0.0.1-SNAPSHOT/api/books/{isbn}
curl -X POST \ http://localhost:8080/microprofile-service-example-0.0.1-SNAPSHOT/api/books \ -H 'content-type: application/json' \ -d '{ "isbn": 2, "title": "JavaEE Master book", "description": "Get Started with Java EE", "author": { "id": 1, "firstName": "Java", "lastName": "EE" } }'