/jax-rs-cdi-events

Java EE 8 project to play with JAX-RS and CDI events

Primary LanguageJava

JAX-RS-CDI-Events

The project is a playgroung to learn about JAX-RS and CDi events.

Deploy

Build and deploy the .war on Payara 5 since I'm using the embedded H2 database.

Endpoints

localhost:8080/jax-rs-cdi-events/resources/messages

GET: finds all messages from the db

POST: creates new message : { "title" = "whatever" }

localhost:8080/jax-rs-cdi-events/resources/messages

GET: finds all messages that have been created with the POST method

localhost:8080/jax-rs-cdi-events/resources/messages/<id>

GET: if message is found return it, otherwise throw exception

localhost:8080/jax-rs-cdi-events/resources/messages/exception

GET: always throw NotFoundException