December 2017
Intermediate to advanced
372 pages
8h 46m
English
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", ...Read now
Unlock full access