Mongodb的java driver中的Mongo和MongoClient有什么区别

2025-04-27 18:28:07
推荐回答(1个)
回答1:

仔细看了下它的包,MongoClient以及相关类只在2.1X相关版本中存在,虽然它在各种文档及API中信誓旦旦说明以后可能会把Mongo废弃,但是,后来废弃的却是MongoClient。不更新文档的后果……Note:ThisclasshasbeensupersededbyMongoClient,andmaybedeprecatedinafuturerelease.Newinversion2.10.0:TheMongoClientclassisnewinversion2.10.0.Forreleasespriortothat,pleaseusetheMongoclassinstead.