This repo contains some example code that exposes some Spring Data repositories via Spring Data REST to show how to handle relationships between JPA entities via the REST API.
The companion blog post with more details can be found here.
Simply run gradlew bootrun
on Windows or ./gradlew.sh bootrun
on Unix.