我正在使用 Apache Polygene (Qi4j) 2.1,并且正在尝试将 MongoDB 实体存储与多个节点和副本集一起使用。
我mongodb.booking.store.properties
文件中的当前配置是:
hostname=localhost
port=27017
nodes=192.168.1.100:27017, 192.168.1.101:27017, 192.168.1.102:27017
database=example
collection=example
我得到以下错误:
org.qi4j.api.value.NoSuchValueException: Could not find any visible ValueComposite of type [com.mongodb.ServerAddress] in module [config]
但是当我nodes
从上述文件中删除该属性时,一切正常,并且与 mongo 的连接成功。
如何使用多个节点和副本集?