-
Couldn't load subscription status.
- Fork 41.6k
Closed
Labels
status: supersededAn issue that has been superseded by anotherAn issue that has been superseded by another
Description
First off, I'm not using reactive driver.
There are examples using a MongoClientSettingsBuilderCustomizer bean to access the settings builder for modifications. But they don't seem to work with synchronous drivers, which is very confusing, even though they share the same settings.
Right now I'm kinda forced to create my own MongoClient bean to inject custom settings which will break all auto configuration.
I'm trying to register default codec for pojos, because I need them for some special cases.
@Bean
public MongoClientSettingsBuilderCustomizer customizer() {
return (builder) -> {
CodecRegistry pojoCodecRegistry = CodecRegistries.fromRegistries(
MongoClientSettings.getDefaultCodecRegistry(),
CodecRegistries.fromProviders(PojoCodecProvider.builder().automatic(true).build()));
builder.codecRegistry(pojoCodecRegistry);
};
}
Would appreciate any workaround for this, if this is not supported yet.
Metadata
Metadata
Assignees
Labels
status: supersededAn issue that has been superseded by anotherAn issue that has been superseded by another