Skip to content

AbstractReactiveMongoConfiguration.mongoDbFactory conflicts with blocking MongoDbFactory [DATAMONGO-1631] #2537

@spring-projects-issues

Description

@spring-projects-issues

Mark Paluch opened DATAMONGO-1631 and commented

Using a configuration that extends AbstractReactiveMongoConfiguration with Spring Boot causes a conflict with the blocking MongoDbFactory bean. The reactive database factory ReactiveMongoDatabaseFactory is exposed through the method mongoDbFactory which hides the blocking MongoDbFactory bean.

Workaround: Add a method with a different name to the configuration.

class AppConfig extends AbstractReactiveMongoConfiguration {

    // …

    @Bean
    public ReactiveMongoDatabaseFactory reactiveMongoDbFactory() {
        return new SimpleReactiveMongoDatabaseFactory(this.mongoClient(), this.getDatabaseName());
    }

    // …

}

Affects: 2.0 M1 (Kay)

Referenced from: pull request #490, and commits fd7b9f6, 3ab3dab, ba81caf, c64ffbe

Metadata

Metadata

Assignees

Labels

in: coreIssues in core supporttype: bugA general bug

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions