From ad75c3cc8e6c93aba52e1c545805edd47c2a6b7d Mon Sep 17 00:00:00 2001 From: Greg Turnquist Date: Fri, 22 May 2015 16:44:39 -0500 Subject: [PATCH] DATAREST-508 - Added details about finding projection definitions. Original pull request: #176. --- src/main/asciidoc/projections-excerpts.adoc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/main/asciidoc/projections-excerpts.adoc b/src/main/asciidoc/projections-excerpts.adoc index bfa5eb13d..9cc62f14b 100644 --- a/src/main/asciidoc/projections-excerpts.adoc +++ b/src/main/asciidoc/projections-excerpts.adoc @@ -133,6 +133,13 @@ It's possible to have multiple projections. NOTE: Visit <> to see an example project you can experiment with. +How does Spring Data REST finds projection defintions? + +* Any `@Projection` interface found in the same package as your entity definitions (or one of it's sub-packages) is registered. +* You can manually register via `RepositoryRestConfiguration.projectionConfiguration().addProjection(…)`. + +In either situtation, the interface with your projection MUST have the `@Projection` annotation. + [[projections-excerpts.finding-projections]] === Finding existing projections