Browse Source

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.
pull/126/head
Thomas Darimont 11 years ago committed by Oliver Gierke
parent
commit
1924aaf7af
  1. 4
      src/main/asciidoc/repositories.adoc

4
src/main/asciidoc/repositories.adoc

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

Loading…
Cancel
Save