File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed
extensions/mongodb-client/runtime/src/main/java/io/quarkus/mongodb/runtime Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change 5
5
import java .util .Optional ;
6
6
import java .util .OptionalInt ;
7
7
8
+ import org .bson .UuidRepresentation ;
9
+
8
10
import io .quarkus .runtime .annotations .ConfigDocSection ;
9
11
import io .quarkus .runtime .annotations .ConfigGroup ;
10
12
import io .quarkus .runtime .annotations .ConfigItem ;
@@ -197,4 +199,10 @@ public class MongoClientConfig {
197
199
@ ConfigItem (name = "health.database" , defaultValue = "admin" )
198
200
public String healthDatabase ;
199
201
202
+ /**
203
+ * Configures the UUID representation to use when encoding instances of {@link java.util.UUID}
204
+ * and when decoding BSON binary values with subtype of 3.
205
+ */
206
+ @ ConfigItem
207
+ public Optional <UuidRepresentation > uuidRepresentation ;
200
208
}
Original file line number Diff line number Diff line change @@ -322,6 +322,10 @@ private MongoClientSettings createMongoConfiguration(MongoClientConfig config) {
322
322
settings .readConcern (new ReadConcern (ReadConcernLevel .fromString (config .readConcern .get ())));
323
323
}
324
324
325
+ if (config .uuidRepresentation .isPresent ()) {
326
+ settings .uuidRepresentation (config .uuidRepresentation .get ());
327
+ }
328
+
325
329
return settings .build ();
326
330
}
327
331
You can’t perform that action at this time.
0 commit comments