Skip to content
Nikolay Vasilev edited this page May 6, 2016 · 3 revisions

Introduction

This project is an example created as a demo for a talk in front of the Bulgarian Java User Group on 10 November 2014. The topic was "REST, HATEOAS, Novelties in JAX-RS 2.0 & Spring HATEOAS". I presented the Spring-related part.

Use Case

The use case used is fairly simple one - a poll system. The resources which are supposed to be exposed are:

  • Poll - A topic/question which options/answers the users should chose.
  • Alternative - The various options/answers associated to a topic/question (i.e. poll).
  • Vote - An actual Vote for an alternative which an user provides.

If we represent the relation between the resources as a simplified class diagram, it would look like the following one:

Technologies Used

The technologies used in the project are:

  • Java 8
  • Spring 4.0
  • Spring Boot 1.1.8.RELEASE
  • Spring HATEOAS

Note, that as this is a project-demo, no tests were implemented nor the code itself is with production quality.

Resources Endpoints

On the following wiki pages you could find more information what are the resource end points and how to interact with them:

Resource Handling Workflow

The application workflow for building simple resources (e.g. Alternative or Vote) looks like:

The application workflow for building resources which embed other resources (e.g. Poll) looks like:

Resources

Clone this wiki locally