Now, it's time to build our RESTful web service implementation, as follows:
- Delete the default implementation class, HelloWorldEndpoint.java, created by the Thorntail generator.
- Define a new package, named service (the fully qualified name will be com.packtpub.thorntail.footballplayermicroservice.rest.service), where we will put the RESTful web service implementation.
- Finally, let's build the API implementations by using the CDI specifications (in order to inject the entity manager used to manage database connections) and the JAX-RS (in order to implement the RESTful operations). We will create an AbstractFacade class that defines the standard CRUD of our microservice:
package com.packtpub.thorntail.footballplayermicroservice.rest.service; ...