Skip to content

Commit feab68f

Browse files
christophstroblmp911de
authored andcommitted
Update custom repository extension section.
Closes #3200 Original pull request: #3201
1 parent 33f286a commit feab68f

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

src/main/antora/modules/ROOT/pages/repositories/custom-implementations.adoc

+13-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,19 @@ class CustomizedUserRepositoryImpl implements CustomizedUserRepository {
2929
}
3030
----
3131

32-
NOTE: The most important part of the class name that corresponds to the fragment interface is the `Impl` postfix.
32+
[NOTE]
33+
====
34+
The most important part of the class name that corresponds to the fragment interface is the `Impl` postfix.
35+
You can customize the store specific postfix by setting `@Enable<StoreModule>Repositories#repositoryImplementationPostfix`.
36+
====
37+
38+
[WARNING]
39+
====
40+
Historically Spring Data custom repository behaviour followed a https://docs.spring.io/spring-data/commons/docs/1.9.0.RELEASE/reference/html/#repositories.single-repository-behaviour[different naming pattern] that is not recommended but still supported.
41+
A type located in the same package as the repository interface, matching _repository interface name_ + _implementation postfix_, is considered a custom implementation and will be treated as such.
42+
This can lead to unexpected failures. +
43+
Please consider the old extension strategy deprecated, with the intention of removal in the next major version.
44+
====
3345

3446
The implementation itself does not depend on Spring Data and can be a regular Spring bean.
3547
Consequently, you can use standard dependency injection behavior to inject references to other beans (such as a `JdbcTemplate`), take part in aspects, and so on.

0 commit comments

Comments
 (0)