Skip to content

MongoDataAutoConfiguration not applied when a MongoDbFactory is provided by Spring Cloud #17416

@edouardhue

Description

@edouardhue

in Spring Boot 2.1.5, org.springframework.boot.autoconfigure.data.mongo.MongoDataAutoConfiguration has the condition AnyMongoClientAvailable that requires a MongoClient bean to be present. When using the ServiceConnectionFactory from Spring Cloud Spring Services 2.0.5, only a MongoDbFactory is present, thus MongoDataAutoConfiguration is never applied. org.springframework.boot.autoconfigure.mongo.MongoAutoConfiguration will not create a client either.

The AnyMongoClientAvailable condition should be only on org.springframework.boot.autoconfigure.data.mongo.MongoDataAutoConfiguration#mongoDbFactory.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions