MongoClientAutoConfiguration

@AutoConfiguration(before = [WowAutoConfiguration::class])
@ConditionalOnClass(name = ["me.ahoo.wow.mongo.MongoStoreProvider"])
@ConditionalOnMissingClass(value = ["org.springframework.boot.mongodb.autoconfigure.MongoAutoConfiguration"])
@ConditionalOnProperty(value = ["spring.mongodb.uri"])
class MongoClientAutoConfiguration

The application's MongoDB client, from its properties alone: when wow-mongo is on the class path, spring.mongodb.uri is set, the application has no MongoClient bean and no Spring Boot MongoDB (spring-boot-mongodb, whose own auto-configuration then makes it), the host makes a MongoClient of the URI; closed with the context. The MongoDB stores then open over it, in the database their database option names.

Constructors

Link copied to clipboard
constructor()

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
@Bean(destroyMethod = "close")
@ConditionalOnMissingBean(value = [MongoClient::class])
fun wowMongoClient(environment: Environment, gauges: ObjectProvider<MongoPoolGauge>): MongoClient