Skip to content

Application custom conversions override spring-data-couchbase custom conversions since v5 #1876

Closed
@roman-sinyakov

Description

@roman-sinyakov

We use Couchbase configuration with our own custom conversions declared like below since v4:

public class CouchbaseConfig extends AbstractCouchbaseConfiguration {
    ...

    @Override
    @Bean(name = BeanNames.COUCHBASE_CUSTOM_CONVERSIONS)
    public CustomConversions customConversions () {
        return new CouchbaseCustomConversions(<our own convertors>);
    }

Method AbstractCouchbaseConfiguration.customConversions() is empty in v4:

public abstract class AbstractCouchbaseConfiguration {
        ...
	@Bean(name = BeanNames.COUCHBASE_CUSTOM_CONVERSIONS)
	public CustomConversions customConversions() {
		return new CouchbaseCustomConversions(Collections.emptyList());
	}

After upgrade to v5 spring-data-couchbase owned convertors (e.g. StringToEnumConverterFactory) stopped working since this method AbstractCouchbaseConfiguration.customConversions() started declaring them since v5:

public abstract class AbstractCouchbaseConfiguration {
        ...
        public CustomConversions customConversions() {
		return customConversions(getCryptoManager(), getObjectMapper());
	}

I cannot see any way to have our own custom convertors and keep spring-data-couchbase custom convertors at the same time.
spring-data-couchbase 5.1.4
Please help

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions