测试我的 Vert.x 应用程序启动时与 MongoDB 的连接。

huangapple 未分类评论46阅读模式
英文:

Test Mongo connection at my vertx application startup

问题

我目前需要在应用程序启动时使用Vertx MongoDB Client测试我的MongoDB连接。但在其文档中没有此选项。有心跳配置属性,但这种方法只会生成日志。我需要尝试并处理连接错误。

有什么建议吗?

谢谢

英文:

I've currently needed to test my mongodb connection at application startup using Vertx MongoDB Client. But there's no option to do this in its docs. There's a heartbeat configuration properties but this approach only gives me logs. I need try and handle connection errors.

Any suggestions?

Thanx

huangapple
  • 本文由 发表于 2020年4月4日 00:08:22
  • 转载请务必保留本文链接:https://java.coder-hub.com/61015975.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定