git clone https://github.com/jchart-github/jaxrs2-starter-kit.git
It contains sample client and server that is easily built and run using Maven.
The project demonstrates:
- The new Client API
- Request/Response
- The Invocation Object and the Command Pattern
- Build-in Entity Resolvers for Object Unmarshalling
- Server Resource
- Server Filter
- Spring Integration
- Content Negotiation with using default Entity Resolvers
Browse the jaxrs2-starter-kit
The starter kits implements a /books resource.
It uses the following rules in its RESTFul implementation:
For collections
Resource /books
@POST create a new book
@GET list all books
@PUT bulk update books
@DELETE delete all books
For single resources
Resources /books/{id}
@POST Error
@GET return a book
@PUT if exists, update book; if not ERROR
@DELETE delete a book