DATAMONGO-2427 - Update GridFS API to use MongoDB native ByteBuffer Publisher API and introduce UUID format configuration options.
Move from AsyncInputStream handling to Publisher for GridFS. UUID types require additional configuration setup to prevent errors while processing legacy (type 3) binary types. We still use type 3 as default but allow codec configuration for type 4 via Java and XML configuration. Updated migration guide. Original pull request: #823.
This commit is contained in:
committed by
Mark Paluch
parent
6049541d0a
commit
f09c622b2f
@@ -13,6 +13,9 @@ Instead of the single artifact uber-jar `mongo-java-driver`, imports are now spl
|
||||
* `org.mongodb:mongodb-driver-sync` (optional)
|
||||
* `org.mongodb:mongodb-driver-reactivestreams` (optional)
|
||||
|
||||
Depending on the application one of the `mongodb-driver-sync`, `mongodb-driver-reactivestreams` artifacts is is required next to the mandatory `mongodb-driver-core`.
|
||||
It is possible to combine the sync and reactive drivers in one application if needed.
|
||||
|
||||
== Java Configuration
|
||||
|
||||
.Java API changes
|
||||
@@ -140,3 +143,26 @@ Element | Comment
|
||||
|
||||
|===
|
||||
|
||||
== Other Changes
|
||||
|
||||
=== UUID Types
|
||||
|
||||
The MongoDB UUID representation can now be configured with different formats.
|
||||
This has to be done via `MongoClientSettings` as shown in the snippet below.
|
||||
|
||||
.UUid Codec Configuration
|
||||
====
|
||||
[source,java]
|
||||
----
|
||||
|
||||
static class Config extends AbstractMongoClientConfiguration {
|
||||
|
||||
@Override
|
||||
public void configureClientSettings(MongoClientSettings.Builder builder) {
|
||||
builder.uuidRepresentation(UuidRepresentation.STANDARD);
|
||||
}
|
||||
|
||||
// ...
|
||||
}
|
||||
----
|
||||
====
|
||||
|
||||
Reference in New Issue
Block a user