英文:
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
专注分享java语言的经验与见解,让所有开发者获益!
评论