http://commons.wikimedia.org |
@Singleton
.The code was originally developed with JAX-RS 1.0, but I went back and retrofitted it to work on JAX-RS 1.1. The code has a
@Singleton
that manages the "Widgets" that are created using the HTTP POST. It is a simple and fun example of what you can do with JAX-RS.It is a simple application that creates "Widget" objects and returns JSON with the widget data.
The code for the project can be found here: jersey-post-example
Note: This example application needs to be run on GlassFish 3.1.2+ because of an issue with Guava GlassFish 4.
JSON Response |
No comments:
Post a Comment