我是 mongo scala 驱动程序的新手我正在尝试在启动 mongo 实例时添加连接池大小我正在做这样的事情
val settings: MongoClientSettings = MongoClientSettings.builder()
.applyToConnectionPoolSettings(ConnectionPoolSettings.Builder.maxSize(100))
.applyToClusterSettings(b => b.hosts(List(new ServerAddress("localhost")).asJava).description("Local Server"))
.build()
val mongoClient: MongoClient = MongoClient(settings)
值 maxSize 不是对象 com.mongodb.connection.ConnectionPoolSettings.Builder [错误] .applyToConnectionPoolSettings(ConnectionPoolSettings.Builder.maxSize(100)) 的成员
这样做的正确方法是什么?