MongoHealthIndicator
@Singleton
@Requires(beans = [MongoClient::class] )
@Requires(property = "endpoints.health.mongodb.enabled", notEquals = "false")
Reports MongoDB connectivity on the /health endpoint.
Micronaut only ships a Mongo health indicator for the reactive driver; these services use micronaut-data-mongodb on the synchronous driver, so /health would otherwise never reflect the database. This runs a lightweight ping against the already-wired sync MongoClient.
Disable with endpoints.health.mongodb.enabled: false.