This example demonstrates how to develop RESTful hello world web service using Groovy and the embedded Grizzly server.
The example consists of just one Jersey resource:
com.sun.jersey.samples.groovy.GroovyResource
The mapping of the URI path space is presented in the following table:
URI path | Resource class | HTTP methods |
---|---|---|
/groovy | GroovyResource | GET |
Run the example as follows:
run
mvn compile exec:java
From a web browser, visit:
http://localhost:9998/groovy