我正在使用分片mongo数据库测试我的spring应用程序。
我的配置是:
System-1 (Config server and Mongos)
System-2 (Shard0000) [Standalone mongod instance, not a replica set]
System-3 (Shard0001) [Standalone mongod instance, not a replica set]
在我的测试中,我试图取下其中一个分片并检查数据的一致性。我的问题是如何配置spring应用程序。
我试过了,
new SimpleMongoDbFactory(new MongoURI("mongodb://System-2,System-3/db-name"));
但是我收到了错误
Expecting a single StandAlone, but found more than one. Removing
System-2:27017 from client view of cluster
和
Expecting a single StandAlone, but found more than one. Removing
System-3:27017 from client view of cluster.
如何正确配置?