Skip to content

Configure Couchbase to use the application's ObjectMapper #24616

Closed
@micopiira

Description

@micopiira

Could the CouchbaseAutoConfiguration use existing Jackson ObjectMapper bean instance by default?

Maybe add something like this to the CouchbaseAutoConfiguration class?

@Bean
@ConditionalOnBean(ObjectMapper.class)
public ClusterEnvironmentBuilderCustomizer cluster(ObjectMapper objectMapper) {
  return builder -> builder.jsonSerializer(JacksonJsonSerializer.create(objectMapper));
}

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions