<connectionStrings>
<!--从PRIMARY库读取,会立即显示最新数据-->
<add name="PattayaDBConnection" connectionString="mongodb://username:[email protected],IP2,IP3,IP4/DBname?replicaSet=rs_main&readPreference=primary" />
<!--从SECONDARY库读取-->
<add name="Pattaya.ProductMongoDbProvider.ProductDB" connectionString="mongodb://username:[email protected],IP2,IP3,IP4/DBname?replicaSet=rs_main&readPreference=secondaryPreferred" />
<!--没有readPreference参数是只写,不用读-->
<add name="PattayaMallHistoryConnection" connectionString="mongodb://username:[email protected],IP2,IP3,IP4/DBname?replicaSet=rs_main" />
</connectionStrings>
注:在HTML中的&用&来表示
时间: 2024-10-06 12:59:09