The controller service

The controller service is a standard RESTful web service implementation of a controller in the MVC design pattern, implemented using JAX-RS:

package net.ensode.javaee8book.microservices.crudcontroller.service; 
//imports omitted for brevity 
@Path("/customercontroller") 
public class CustomerControllerService { 
     
    public CustomerControllerService() { 
    } 
 
    @OPTIONS 
    public Response options() { 
        return Response.ok("") 
                .header("Access-Control-Allow-Origin",                                        "http://localhost:8080") .header("Access-Control-Allow-Headers", "origin," + "content-type, accept, authorization") .header("Access-Control-Allow-Credentials", "true") .header("Access-Control-Allow-Methods", "GET, POST, PUT, DELETE, OPTIONS, HEAD") .header("Access-Control-Max-Age", ...

Get Java EE 8 Application Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.