List of Listings

 

Chapter 1. Enterprise Java microservices

Listing 1.1. CDI service

Listing 1.2. JAX-RS endpoint

Chapter 2. Developing a simple RESTful microservice

Listing 2.1. CORSFilter

Listing 2.2. AdminApplication

Listing 2.3. @GET on CategoryResource

Listing 2.4. @DELETE on CategoryResource

Listing 2.5. @POST on CategoryResource

Listing 2.6. Maven plugin configuration

Chapter 3. Just enough Application Server for microservices

Listing 3.1. CartItem

Listing 3.2. CartController

Listing 3.3. CartController RESTful path

Listing 3.4. CartController methods with annotations

Listing 3.5. Chapter3Configuration

Listing 3.6. Chapter3Application

Listing 3.7. CartItem with JAXB mappings

Listing 3.8. CartController with Payara

Listing 3.9. JaxrsApplication with Payara

Listing 3.10. CartController with Spring Boot

Listing 3.11. Chapter3SpringBootApplication

Listing 3.12. Plugin configuration

Listing 3.13. JaxrsApplication with Thorntail

Chapter 4. Microservices testing

Listing 4.1. CategoryTest

Listing 4.2. Retrieve all categories in listing 4.1’s CategoryResourceTest

Listing 4.3. Retrieve category in CategoryResourceTest

Listing 4.4. ConfigureJacksonProvider

Listing 4.5. Create category in CategoryResourceTest

Listing 4.6. CategoryResource

Listing 4.7. Fail to create category in CategoryResourceTest

Listing 4.8. CategoryResource.create()