Wednesday, August 27, 2014

Building a JAX-RS service in 5 minutes ...


This post seems to be bit crazy. But with the help of Grizzly, Jersey, and Glassfish I was able to implement it with in 5 minutes.


So here how I did.

Step 1
========

Create a http server by using GrizzlyServerFactory.



Step 2
========

Now create a resource handling class inside the package domain. You might have noticed as we are mentioning to look-up for resource handling service classed inside "domain" package. 
You can test this example by using link http://localhost:9999/users/all.

You can find the source code here

No comments:

Post a Comment