tree: 84dff15bf1e9be12dce34db9c172a0e4379a9556 [path history] [tgz]
  1. src/
  2. pom.xml
  3. README.MD
examples/helloworld-spring-webapp/README.MD

Jersey Spring Integration Spring Helloworld WebApp Example

This example demonstrates how to create simple Jersey application that utilises Spring 3 DI features, packaged into WAR file.

Contents

The mapping of the URI path space is presented in the following table:

URI pathResource classHTTP methods
/jersey-helloJerseyResourceGET
/spring-helloSpringRequestResourceGET
/spring-singleton-helloSpringSingletonResourceGET

Application is configured by using web.xml, which registers javax.ws.rs.core.Application descendant to get classes and singletons from it (see class MyApplication).

Running the Example

Run the example as follows:

mvn clean package jetty:run

This deploys current example using Jetty web server. Once deployed, the application is ready to serve the following resources: