From 19b843073eb09d2ff7796a513e8daf465f0ad880 Mon Sep 17 00:00:00 2001 From: Thomas Darimont Date: Mon, 13 Apr 2015 15:25:33 +0200 Subject: [PATCH] DATACMNS-682 - Add details of how to customize repository scanning using JavaConfig. Completed description for the packages-to-scan customization with JavaConfig. Original pull request: #121. --- src/main/asciidoc/repositories.adoc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/asciidoc/repositories.adoc b/src/main/asciidoc/repositories.adoc index c74ef4b97..0a811cb8a 100644 --- a/src/main/asciidoc/repositories.adoc +++ b/src/main/asciidoc/repositories.adoc @@ -147,7 +147,9 @@ or via <>: ---- + -The JPA namespace is used in this example. If you are using the repository abstraction for any other store, you need to change this to the appropriate namespace declaration of your store module which should be exchanging `jpa` in favor of, for example, `mongodb`. Also, note that the JavaConfig variant doesn't configure a package explictly as the package of the annotated class is used by default. To customize the package to scan +The JPA namespace is used in this example. If you are using the repository abstraction for any other store, you need to change this to the appropriate namespace declaration of your store module which should be exchanging `jpa` in favor of, for example, `mongodb`. + +Also, note that the JavaConfig variant doesn't configure a package explictly as the package of the annotated class is used by default. To customize the package to scan use one of the `basePackage…` attribute of the data-store specific repository `@Enable…`-annotation. . Get the repository instance injected and use it. +