更新时间:2022-04-14 15:16:15
as MarkusWMahlberg 正确注意到,有必要记下连接字符串中的数据库名称。
As MarkusWMahlberg correctly noted, it is necessary to note the database name in the connection string.
例如:
String mongoClientURI = "mongodb://" + DB_SRV_USR + ":" + DB_SRV_PWD + "@" + DB_URL + ":" + DB_PORT + "/" + dbName;