This recipe will show you how to take advantage of CDI and JAX-RS features to reduce the effort and lower the complexity of writing powerful services.
Improving service's capabilities with JAX-RS and CDI
Getting ready
Start by adding the Java EE dependency:
<dependencies>
<dependency>
<groupId>javax</groupId>
<artifactId>javaee-api</artifactId>
<version>8.0</version>
<scope>provided</scope>
</dependency>
</dependencies>