Skip to content

A spring-data-rest example of how to map entity fields to REST resources

Notifications You must be signed in to change notification settings

SteveConnelly/spring-data-rest-external-resource-mapping

Repository files navigation

spring-data-rest-external-resource-mapping

This example spring-data-rest project illustrates linking a field within an Entity to a REST resource, as opposed to another table.

Annotations within an @Entity class indicate the intent of linking to a REST resource, and a custom ResourceProcessor is used to add links and resolve external resources within the HATEOAS output

Some simple data is loaded on startup via a "BootstrapData" class.

Usage:

./gradlew bootRun

Endpoints:

curl http://localhost:8080/users

curl http://localhost:8080/profiles

About

A spring-data-rest example of how to map entity fields to REST resources

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages