Skip to content

Commit 7c81b2c

Browse files
committed
Bundle Javadoc with Antora documentation site.
Closes #4754
1 parent f81d29a commit 7c81b2c

File tree

14 files changed

+41
-26
lines changed

14 files changed

+41
-26
lines changed

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,5 @@ atlassian-ide-plugin.xml
1919
build/
2020
node_modules
2121
node
22-
package.json
2322
package-lock.json
2423
.mvn/.gradle-enterprise
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"dependencies": {
3+
"antora": "3.2.0-alpha.6",
4+
"@antora/atlas-extension": "1.0.0-alpha.2",
5+
"@antora/collector-extension": "1.0.0-alpha.7",
6+
"@asciidoctor/tabs": "1.0.0-beta.6",
7+
"@springio/antora-extensions": "1.13.0",
8+
"@springio/asciidoctor-extensions": "1.0.0-alpha.11"
9+
}
10+
}

spring-data-mongodb-distribution/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666
<artifactId>maven-assembly-plugin</artifactId>
6767
</plugin>
6868
<plugin>
69-
<groupId>io.spring.maven.antora</groupId>
69+
<groupId>org.antora</groupId>
7070
<artifactId>antora-maven-plugin</artifactId>
7171
</plugin>
7272
</plugins>

src/main/antora/antora-playbook.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@
33
# The purpose of this Antora playbook is to build the docs in the current branch.
44
antora:
55
extensions:
6-
- '@antora/collector-extension'
7-
- require: '@springio/antora-extensions/root-component-extension'
6+
- require: '@springio/antora-extensions'
87
root_component_name: 'data-mongodb'
98
site:
109
title: Spring Data MongoDB
@@ -22,13 +21,12 @@ content:
2221
start_path: src/main/antora
2322
asciidoc:
2423
attributes:
25-
page-pagination: ''
2624
hide-uri-scheme: '@'
2725
tabs-sync-option: '@'
28-
chomp: 'all'
2926
extensions:
3027
- '@asciidoctor/tabs'
3128
- '@springio/asciidoctor-extensions'
29+
- '@springio/asciidoctor-extensions/javadoc-extension'
3230
sourcemap: true
3331
urls:
3432
latest_version_segment: ''
@@ -38,5 +36,5 @@ runtime:
3836
format: pretty
3937
ui:
4038
bundle:
41-
url: https://github.com/spring-io/antora-ui-spring/releases/download/v0.3.5/ui-bundle.zip
39+
url: https://github.com/spring-io/antora-ui-spring/releases/download/v0.4.16/ui-bundle.zip
4240
snapshot: true

src/main/antora/antora.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,8 @@ ext:
1010
local: true
1111
scan:
1212
dir: spring-data-mongodb-distribution/target/classes/
13+
- run:
14+
command: ./mvnw package -Pdistribute
15+
local: true
16+
scan:
17+
dir: target/antora

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,3 +64,6 @@
6464
** xref:kotlin/extensions.adoc[]
6565
** xref:kotlin/coroutines.adoc[]
6666
67+
* xref:attachment$api/java/index.html[Javadoc,role=link-external,window=_blank]
68+
* https://github.com/spring-projects/spring-data-commons/wiki[Wiki,role=link-external,window=_blank]
69+

src/main/antora/modules/ROOT/pages/mongodb/aggregation-framework.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ For further information, see the full https://docs.mongodb.org/manual/aggregatio
88
[[mongo.aggregation.basic-concepts]]
99
== Basic Concepts
1010

11-
The Aggregation Framework support in Spring Data MongoDB is based on the following key abstractions: `Aggregation`, `AggregationDefinition`, and `AggregationResults`.
11+
The Aggregation Framework support in Spring Data MongoDB is based on the following key abstractions: javadoc:org.springframework.data.mongodb.core.aggregation.Aggregation[] and javadoc:org.springframework.data.mongodb.core.aggregation.AggregationResults[].
1212

1313
* `Aggregation`
1414
+

src/main/antora/modules/ROOT/pages/mongodb/change-streams.adoc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ In doubt, use `Document`.
1616
== Change Streams with `MessageListener`
1717

1818
Listening to a https://docs.mongodb.com/manual/tutorial/change-streams-example/[Change Stream by using a Sync Driver] creates a long running, blocking task that needs to be delegated to a separate component.
19-
In this case, we need to first create a `MessageListenerContainer`, which will be the main entry point for running the specific `SubscriptionRequest` tasks.
20-
Spring Data MongoDB already ships with a default implementation that operates on `MongoTemplate` and is capable of creating and running `Task` instances for a `ChangeStreamRequest`.
19+
In this case, we need to first create a javadoc:org.springframework.data.mongodb.core.messaging.MessageListenerContainer[] which will be the main entry point for running the specific `SubscriptionRequest` tasks.
20+
Spring Data MongoDB already ships with a default implementation that operates on `MongoTemplate` and is capable of creating and running `Task` instances for a javadoc:org.springframework.data.mongodb.core.messaging.ChangeStreamRequest[].
2121

2222
The following example shows how to use Change Streams with `MessageListener` instances:
2323

@@ -73,7 +73,7 @@ Flux<ChangeStreamEvent<User>> flux = reactiveTemplate.changeStream(User.class) <
7373
== Resuming Change Streams
7474

7575
Change Streams can be resumed and resume emitting events where you left. To resume the stream, you need to supply either a resume
76-
token or the last known server time (in UTC). Use `ChangeStreamOptions` to set the value accordingly.
76+
token or the last known server time (in UTC). Use javadoc:org.springframework.data.mongodb.core.ChangeStreamOptions[] to set the value accordingly.
7777

7878
The following example shows how to set the resume offset using server time:
7979

src/main/antora/modules/ROOT/pages/mongodb/getting-started.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ Person [id=4ddbba3c0be56b7e1b210166, name=Joe, age=34]
5555
Even in this simple example, there are few things to notice:
5656

5757
* You can instantiate the central helper class of Spring Mongo, xref:mongodb/template-api.adoc[`MongoTemplate`], by using the standard or reactive `MongoClient` object and the name of the database to use.
58-
* The mapper works against standard POJO objects without the need for any additional metadata (though you can optionally provide that information. See xref:mongodb/mapping/mapping.adoc[here].).
58+
* The mapper works against standard POJO objects without the need for any additional metadata (though you can optionally provide that information. See xref:mongodb/mapping/mapping.adoc[here]).
5959
* Conventions are used for handling the `id` field, converting it to be an `ObjectId` when stored in the database.
6060
* Mapping conventions can use field access. Notice that the `Person` class has only getters.
6161
* If the constructor argument names match the field names of the stored document, they are used to instantiate the object

src/main/antora/modules/ROOT/pages/mongodb/lifecycle-events.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ The MongoDB mapping framework includes several `org.springframework.context.Appl
55
Being based on Spring's `ApplicationContext` event infrastructure enables other products, such as Spring Integration, to easily receive these events, as they are a well known eventing mechanism in Spring-based applications.
66

77
Entity lifecycle events can be costly and you may notice a change in the performance profile when loading large result sets.
8-
You can disable lifecycle events on the link:https://docs.spring.io/spring-data/mongodb/docs/{version}/api/org/springframework/data/mongodb/core/MongoTemplate.html#setEntityLifecycleEventsEnabled(boolean)[Template API].
8+
You can disable lifecycle events on the javadoc:org.springframework.data.mongodb.core.MongoTemplate#setEntityLifecycleEventsEnabled(boolean)[Template API].
99

1010
To intercept an object before it goes through the conversion process (which turns your domain object into a `org.bson.Document`), you can register a subclass of `AbstractMongoEventListener` that overrides the `onBeforeConvert` method.
1111
When the event is dispatched, your listener is called and passed the domain object before it goes into the converter.
@@ -23,7 +23,7 @@ public class BeforeConvertListener extends AbstractMongoEventListener<Person> {
2323
----
2424
====
2525

26-
To intercept an object before it goes into the database, you can register a subclass of `org.springframework.data.mongodb.core.mapping.event.AbstractMongoEventListener` that overrides the `onBeforeSave` method. When the event is dispatched, your listener is called and passed the domain object and the converted `com.mongodb.Document`. The following example shows how to do so:
26+
To intercept an object before it goes into the database, you can register a subclass of javadoc:org.springframework.data.mongodb.core.mapping.event.AbstractMongoEventListener[] that overrides the `onBeforeSave` method. When the event is dispatched, your listener is called and passed the domain object and the converted `com.mongodb.Document`. The following example shows how to do so:
2727

2828
====
2929
[source,java]

0 commit comments

Comments
 (0)