Skip to content

Commit 887053a

Browse files
Add migration guide.
1 parent aee03df commit 887053a

File tree

2 files changed

+39
-0
lines changed

2 files changed

+39
-0
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
** xref:migration-guides.adoc[]
44
*** xref:migration-guide/migration-guide-2.x-to-3.x.adoc[]
55
*** xref:migration-guide/migration-guide-3.x-to-4.x.adoc[]
6+
*** xref:migration-guide/migration-guide-4.x-to-5.x.adoc[]
67
78
* xref:mongodb.adoc[]
89
** xref:preface.adoc[]
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
[[mongodb.migration.4.x-5.x]]
2+
= Migration Guide from 4.x to 5.x
3+
4+
Spring Data MongoDB 4.x requires the MongoDB Java Driver 5.5.x +
5+
To learn more about driver versions please visit the https://www.mongodb.com/docs/drivers/java/sync/current/upgrade/[MongoDB Documentation].
6+
7+
== UUID Representation Changes
8+
9+
Spring Data no longer defaults UUID settings via its configuration support classes, factory beans, nor XML namespace. +
10+
In order to persist UUID values the `UuidRepresentation` hast to be set explicitly.
11+
12+
[tabs]
13+
======
14+
Java::
15+
+
16+
[source,java,indent=0,subs="verbatim,quotes",role="primary"]
17+
----
18+
@Configuration
19+
static class Config extends AbstractMongoClientConfiguration {
20+
21+
@Override
22+
protected void configureClientSettings(Builder builder) {
23+
builder.uuidRepresentation(UuidRepresentation.STANDARD);
24+
}
25+
26+
// ...
27+
}
28+
----
29+
30+
XML::
31+
+
32+
[source,xml,indent=0,subs="verbatim,quotes",role="secondary"]
33+
----
34+
<mongo:mongo-client>
35+
<mongo:client-settings uuid-representation="STANDARD"/>
36+
</mongo:mongo-client>
37+
----
38+
======

0 commit comments

Comments
 (0)