Skip to content

Commit 38aa8a2

Browse files
Update code format in documentation.
Original Pull Request: #5039
1 parent f81008b commit 38aa8a2

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

src/main/antora/modules/ROOT/pages/mongodb/mapping/mapping-index-management.adoc

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class MyListener {
2828
public void initIndicesAfterStartup() {
2929
3030
MappingContext<? extends MongoPersistentEntity<?>, MongoPersistentProperty> mappingContext = mongoTemplate
31-
.getConverter().getMappingContext();
31+
.getConverter().getMappingContext();
3232
3333
IndexResolver resolver = new MongoPersistentEntityIndexResolver(mappingContext);
3434
@@ -43,25 +43,25 @@ class MyListener {
4343
====
4444
[source,java]
4545
----
46-
class MyListener{
46+
class MyListener {
4747
4848
@EventListener(ContextRefreshedEvent.class)
4949
public void initIndicesAfterStartup() {
5050
51-
MappingContext<? extends MongoPersistentEntity<?>, MongoPersistentProperty> mappingContext = mongoTemplate
52-
.getConverter().getMappingContext();
51+
MappingContext<? extends MongoPersistentEntity<?>, MongoPersistentProperty> mappingContext = mongoTemplate.
52+
getConverter().getMappingContext();
5353
5454
IndexResolver resolver = new MongoPersistentEntityIndexResolver(mappingContext);
5555
56-
// consider only entities that are annotated with @Document
56+
// consider only entities that are annotated with @Document
5757
mappingContext.getPersistentEntities()
58-
.stream()
59-
.filter(it -> it.isAnnotationPresent(Document.class))
60-
.forEach(it -> {
58+
.stream()
59+
.filter(it -> it.isAnnotationPresent(Document.class))
60+
.forEach(it -> {
6161
62-
IndexOperations indexOps = mongoTemplate.indexOps(it.getType());
63-
resolver.resolveIndexFor(it.getType()).forEach(indexOps::ensureIndex);
64-
});
62+
IndexOperations indexOps = mongoTemplate.indexOps(it.getType());
63+
resolver.resolveIndexFor(it.getType()).forEach(indexOps::ensureIndex);
64+
});
6565
}
6666
}
6767
----

0 commit comments

Comments
 (0)