Skip to content

Commit c7e981a

Browse files
Jay Bryantschauder
authored andcommitted
DATACMNS-1814 - Fixes missing anchors.
Fixes the problem of the "Using filters" link jumping to the top of the document. There was another of these ("Configuration") later in the document, and this commit fixes that one, too. Original pull request: #470.
1 parent f64d561 commit c7e981a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/main/asciidoc/repositories.adoc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -749,6 +749,7 @@ Each Spring Data module includes a `repositories` element that lets you define a
749749

750750
In the preceding example, Spring is instructed to scan `com.acme.repositories` and all its sub-packages for interfaces extending `Repository` or one of its sub-interfaces. For each interface found, the infrastructure registers the persistence technology-specific `FactoryBean` to create the appropriate proxies that handle invocations of the query methods. Each bean is registered under a bean name that is derived from the interface name, so an interface of `UserRepository` would be registered under `userRepository`. The `base-package` attribute allows wildcards so that you can define a pattern of scanned packages.
751751

752+
[[repositories.using-filters]]
752753
==== Using filters
753754
By default, the infrastructure picks up every interface extending the persistence technology-specific `Repository` sub-interface located under the configured base package and creates a bean instance for it. However, you might want more fine-grained control over which interfaces have bean instances created for them. To do so, use `<include-filter />` and `<exclude-filter />` elements inside the `<repositories />` element. The semantics are exactly equivalent to the elements in Spring's context namespace. For details, see the link:{spring-framework-docs}/core.html#beans-scanning-filters[Spring reference documentation] for these elements.
754755

@@ -942,6 +943,7 @@ interface PersonRepository extends CrudRepository<Person, Long>, CustomizedSave<
942943
----
943944
====
944945

946+
[[repositories.configuration]]
945947
==== Configuration
946948
If you use namespace configuration, the repository infrastructure tries to autodetect custom implementation fragments by scanning for classes below the package in which it found a repository. These classes need to follow the naming convention of appending the namespace element's `repository-impl-postfix` attribute to the fragment interface name. This postfix defaults to `Impl`. The following example shows a repository that uses the default postfix and a repository that sets a custom value for the postfix:
947949

0 commit comments

Comments
 (0)