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.
This commit is contained in:
Thomas Darimont
2015-04-13 15:25:33 +02:00
committed by Oliver Gierke
parent 38dbfbf3fb
commit 19b843073e

View File

@@ -147,7 +147,9 @@ or via <<repositories.create-instances,XML configuration>>:
</beans>
----
+
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.
+