Skip to content

MongoClientFactorySupport overrides existing uuidRepresentation with MongoProperties default value #22321

@christophstrobl

Description

@christophstrobl

Original Bug Report: DATAMONGO-2561

I have MongoClientSettings bean defined in my configuration with STANTARD uuid representation.
After migration to spring 2.3.0 this value is always overridden by MongoProperties.uuidRepresentation.
MongoProperties.uuidRepresentation is a field with default value JAVA_LEGACY and even when spring.data.mongodb.uuidRepresentation property is not defined, the default value is used instead of one defined in MongoClientSettings.

MongoClientFactorySupport should check if the source MongoClientSettings passed to createClient already define an uuidRepresentation other than UNDEFINED before applying the default value from MongoProperties that then potentially overrides existing settings.

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions