Skip to content

Commit 6f98114

Browse files
committed
Reorganize antora asciidoc sources for easier reuse.
See #2912
1 parent 5070a0f commit 6f98114

15 files changed

+23
-23
lines changed

src/main/antora/modules/ROOT/nav.adoc

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@
1111
** xref:repositories/custom-implementations.adoc[]
1212
** xref:repositories/core-domain-events.adoc[]
1313
** xref:repositories/core-extensions.adoc[]
14-
* xref:repositories-scrolling.adoc[]
15-
* xref:repositories-null-handling.adoc[]
16-
* xref:repository-projections.adoc[]
14+
** xref:repositories/scrolling.adoc[]
15+
** xref:repositories/null-handling.adoc[]
16+
** xref:repositories/projections.adoc[]
1717
* xref:query-by-example.adoc[]
1818
* xref:auditing.adoc[]
1919
* xref:custom-conversions.adoc[]
@@ -26,7 +26,7 @@
2626
** xref:kotlin/extensions.adoc[]
2727
** xref:kotlin/coroutines.adoc[]
2828
* Appendices
29-
** xref:repository-namespace-reference.adoc[]
30-
** xref:repository-populator-namespace-reference.adoc[]
31-
** xref:repository-query-keywords-reference.adoc[]
32-
** xref:repository-query-return-types-reference.adoc[]
29+
** xref:repositories/namespace-reference.adoc[]
30+
** xref:repositories/populator-namespace-reference.adoc[]
31+
** xref:repositories/query-keywords-reference.adoc[]
32+
** xref:repositories/query-return-types-reference.adoc[]

src/main/antora/modules/ROOT/pages/auditing.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Please refer to the store-specific section for configuration samples.
99

1010
[NOTE]
1111
====
12-
Applications that only track creation and modification dates are not required do make their entities implement xref:auditing.adoc#auditing.auditor-aware[`AuditorAware`].
12+
Applications that only track creation and modification dates are not required do make their entities implement <<auditing.auditor-aware,`AuditorAware`>>.
1313
====
1414

1515
[[auditing.annotations]]

src/main/antora/modules/ROOT/pages/dependencies.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ You can find a working example of using the BOMs in our https://github.com/sprin
4545
== Dependency Management with Spring Boot
4646

4747
Spring Boot selects a recent version of the Spring Data modules for you. If you still want to upgrade to a newer version,
48-
set the `spring-data-bom.version` property to the xref:dependencies.adoc#dependencies.train-version[train version and iteration]
48+
set the `spring-data-bom.version` property to the <<dependencies.train-version,train version and iteration>>
4949
you would like to use.
5050

5151
See Spring Boot's https://docs.spring.io/spring-boot/docs/current/reference/html/dependency-versions.html#appendix.dependency-versions.properties[documentation]

src/main/antora/modules/ROOT/pages/kotlin/null-safety.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Although Java does not let you express null safety in its type system, Spring Da
99
By default, types from Java APIs used in Kotlin are recognized as https://kotlinlang.org/docs/reference/java-interop.html#null-safety-and-platform-types[platform types], for which null checks are relaxed.
1010
https://kotlinlang.org/docs/reference/java-interop.html#jsr-305-support[Kotlin support for JSR-305 annotations] and Spring nullability annotations provide null safety for the whole Spring Data API to Kotlin developers, with the advantage of dealing with `null` related issues at compile time.
1111

12-
See xref:repositories-null-handling.adoc[Null Handling of Repository Methods] how null safety applies to Spring Data Repositories.
12+
See xref:repositories/null-handling.adoc[Null Handling of Repository Methods] how null safety applies to Spring Data Repositories.
1313

1414
[TIP]
1515
====
@@ -19,4 +19,4 @@ For Kotlin versions 1.1+, the default behavior is the same as `-Xjsr305=warn`.
1919
The `strict` value is required take Spring Data API null-safety into account. Kotlin types inferred from Spring API but should be used with the knowledge that Spring API nullability declaration could evolve, even between minor releases and that more checks may be added in the future.
2020
====
2121

22-
NOTE: Generic type arguments, varargs, and array elements nullability are not supported yet, but should be in an upcoming release.
22+
NOTE: Generic type arguments, varargs, and array elements nullability are not supported yet, but should be in an upcoming release.

src/main/antora/modules/ROOT/pages/repositories.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ This chapter explains the core concepts and interfaces of Spring Data repositori
1818
The information in this chapter is pulled from the Spring Data Commons module.
1919
It uses the configuration and code samples for the Jakarta Persistence API (JPA) module.
2020
ifeval::[{include-xml-namespaces} != false]
21-
If you want to use XML configuration you should adapt the XML namespace declaration and the types to be extended to the equivalents of the particular module that you use. "`xref:repository-namespace-reference.adoc#repositories.namespace-reference[Namespace reference]`" covers XML configuration, which is supported across all Spring Data modules that support the repository API.
21+
If you want to use XML configuration you should adapt the XML namespace declaration and the types to be extended to the equivalents of the particular module that you use. "`xref:repositories/namespace-reference.adoc#repositories.namespace-reference[Namespace reference]`" covers XML configuration, which is supported across all Spring Data modules that support the repository API.
2222
endif::[]
23-
"`xref:repository-query-keywords-reference.adoc[Repository query keywords]`" covers the query method keywords supported by the repository abstraction in general.
23+
"`xref:repositories/query-keywords-reference.adoc[Repository query keywords]`" covers the query method keywords supported by the repository abstraction in general.
2424
For detailed information on the specific features of your module, see the chapter on that module of this document.
2525
====
2626

src/main/antora/modules/ROOT/pages/repositories/core-extensions.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ Please refer to the store specific section for more details.
281281
[[core.web.binding]]
282282
=== Web Databinding Support
283283

284-
You can use Spring Data projections (described in xref:repository-projections.adoc[Projections]) to bind incoming request payloads by using either https://goessner.net/articles/JsonPath/[JSONPath] expressions (requires https://github.com/json-path/JsonPath[Jayway JsonPath]) or https://www.w3.org/TR/xpath-31/[XPath] expressions (requires https://xmlbeam.org/[XmlBeam]), as the following example shows:
284+
You can use Spring Data projections (described in xref:repositories/projections.adoc[Projections]) to bind incoming request payloads by using either https://goessner.net/articles/JsonPath/[JSONPath] expressions (requires https://github.com/json-path/JsonPath[Jayway JsonPath]) or https://www.w3.org/TR/xpath-31/[XPath] expressions (requires https://xmlbeam.org/[XmlBeam]), as the following example shows:
285285

286286
.HTTP payload binding using JSONPath or XPath expressions
287287
[source,java]
@@ -305,7 +305,7 @@ The `lastname` XML lookup is performed on the top-level of the incoming document
305305
The JSON variant of that tries a top-level `lastname` first but also tries `lastname` nested in a `user` sub-document if the former does not return a value.
306306
That way, changes in the structure of the source document can be mitigated easily without having clients calling the exposed methods (usually a drawback of class-based payload binding).
307307

308-
Nested projections are supported as described in xref:repository-projections.adoc[Projections].
308+
Nested projections are supported as described in xref:repositories/projections.adoc[Projections].
309309
If the method returns a complex, non-interface type, a Jackson `ObjectMapper` is used to map the final value.
310310

311311
For Spring MVC, the necessary converters are registered automatically as soon as `@EnableSpringDataWebSupport` is active and the required dependencies are available on the classpath.

src/main/antora/modules/ROOT/pages/repositories/definition.adoc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,8 @@ In such cases, a repository definition must distinguish between persistence tech
6666
When it detects multiple repository factories on the class path, Spring Data enters strict repository configuration mode.
6767
Strict configuration uses details on the repository or the domain class to decide about Spring Data module binding for a repository definition:
6868

69-
. If the repository definition xref:repositories/definition.adoc#repositories.multiple-modules.types[extends the module-specific repository], it is a valid candidate for the particular Spring Data module.
70-
. If the domain class is xref:repositories/definition.adoc#repositories.multiple-modules.annotations[annotated with the module-specific type annotation], it is a valid candidate for the particular Spring Data module.
69+
. If the repository definition <<repositories.multiple-modules.types,extends the module-specific repository>>, it is a valid candidate for the particular Spring Data module.
70+
. If the domain class is <<repositories.multiple-modules.annotations,annotated with the module-specific type annotation>>, it is a valid candidate for the particular Spring Data module.
7171
Spring Data modules accept either third-party annotations (such as JPA's `@Entity`) or provide their own annotations (such as `@Document` for Spring Data MongoDB and Spring Data Elasticsearch).
7272

7373
The following example shows a repository that uses module-specific interfaces (JPA in this case):
@@ -149,7 +149,7 @@ One is intended for JPA and the other for MongoDB usage.
149149
Spring Data is no longer able to tell the repositories apart, which leads to undefined behavior.
150150
====
151151

152-
xref:repositories/definition.adoc#repositories.multiple-modules.types[Repository type details] and xref:repositories/definition.adoc#repositories.multiple-modules.annotations[distinguishing domain class annotations] are used for strict repository configuration to identify repository candidates for a particular Spring Data module.
152+
<<repositories.multiple-modules.types,Repository type details>> and <<repositories.multiple-modules.annotations,distinguishing domain class annotations>> are used for strict repository configuration to identify repository candidates for a particular Spring Data module.
153153
Using multiple persistence technology-specific annotations on the same domain type is possible and enables reuse of domain types across multiple persistence technologies.
154154
However, Spring Data can then no longer determine a unique module with which to bind the repository.
155155

src/main/antora/modules/ROOT/pages/repositories-null-handling.adoc renamed to src/main/antora/modules/ROOT/pages/repositories/null-handling.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Besides that, Spring Data supports returning the following wrapper types on quer
1111
Alternatively, query methods can choose not to use a wrapper type at all.
1212
The absence of a query result is then indicated by returning `null`.
1313
Repository methods returning collections, collection alternatives, wrappers, and streams are guaranteed never to return `null` but rather the corresponding empty representation.
14-
See "`xref:repository-query-return-types-reference.adoc[Repository query return types]`" for details.
14+
See "`xref:repositories/query-return-types-reference.adoc[Repository query return types]`" for details.
1515

1616
[[repositories.nullability.annotations]]
1717
== Nullability Annotations

src/main/antora/modules/ROOT/pages/repository-projections.adoc renamed to src/main/antora/modules/ROOT/pages/repositories/projections.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ interface NamesOnly {
179179
}
180180
----
181181

182-
Again, for more complex expressions, you should use a Spring bean and let the expression invoke a method, as described xref:repository-projections.adoc#projections.interfaces.open.bean-reference[earlier].
182+
Again, for more complex expressions, you should use a Spring bean and let the expression invoke a method, as described <<projections.interfaces.open.bean-reference,earlier>>.
183183

184184
[[projections.interfaces.nullable-wrappers]]
185185
=== Nullable Wrappers

src/main/antora/modules/ROOT/pages/repositories/query-methods-details.adoc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,9 @@ interface PersonRepository extends Repository<Person, Long> {
6666
Parsing query method names is divided into subject and predicate.
6767
The first part (`find…By`, `exists…By`) defines the subject of the query, the second part forms the predicate.
6868
The introducing clause (subject) can contain further expressions.
69-
Any text between `find` (or other introducing keywords) and `By` is considered to be descriptive unless using one of the result-limiting keywords such as a `Distinct` to set a distinct flag on the query to be created or xref:repositories/query-methods-details.adoc#repositories.limit-query-result[`Top`/`First` to limit query results].
69+
Any text between `find` (or other introducing keywords) and `By` is considered to be descriptive unless using one of the result-limiting keywords such as a `Distinct` to set a distinct flag on the query to be created or <<repositories.limit-query-result,`Top`/`First` to limit query results>>.
7070

71-
The appendix contains the xref:repository-query-keywords-reference.adoc#appendix.query.method.subject[full list of query method subject keywords] and xref:repository-query-keywords-reference.adoc#appendix.query.method.predicate[query method predicate keywords including sorting and letter-casing modifiers].
71+
The appendix contains the xref:repositories/query-keywords-reference.adoc#appendix.query.method.subject[full list of query method subject keywords] and xref:repositories/query-keywords-reference.adoc#appendix.query.method.predicate[query method predicate keywords including sorting and letter-casing modifiers].
7272
However, the first `By` acts as a delimiter to indicate the start of the actual criteria predicate.
7373
At a very basic level, you can define conditions on entity properties and concatenate them with `And` and `Or`.
7474

@@ -126,7 +126,7 @@ Because we treat the underscore character as a reserved character, we strongly a
126126

127127
Query methods that return multiple results can use standard Java `Iterable`, `List`, and `Set`.
128128
Beyond that, we support returning Spring Data's `Streamable`, a custom extension of `Iterable`, as well as collection types provided by https://www.vavr.io/[Vavr].
129-
Refer to the appendix explaining all possible xref:repository-query-return-types-reference.adoc#appendix.query.return.types[query method return types].
129+
Refer to the appendix explaining all possible xref:repositories/query-return-types-reference.adoc#appendix.query.return.types[query method return types].
130130

131131
[[repositories.collections-and-iterables.streamable]]
132132
=== Using Streamable as Query Method Return Type

0 commit comments

Comments
 (0)