Programmatically configuring JAX-RS resources during deployment

The JAX-RS supports multiple ways to configure a RESTful web service application. A common approach is to subclass javax.ws.rs.core.Application and configure RESTful resources by overriding the appropriate methods. To learn more about configuring JAX-RS applications, refer to the Packaging and deploying JAX-RS applications section in Appendix, Useful Features and Techniques, of this book.

The Jersey framework provides more advanced configuration options for JAX-RS applications through the org.glassfish.jersey.server.ResourceConfig class. The ResourceConfig class is subclassed from javax.ws.rs.core.Application. We have used the Application class in the previous chapter for configuring ...

Get RESTful Java Web Services - Second Edition 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.