Details
-
Task
-
Resolution: Done
-
Major - P3
-
None
-
None
-
None
-
None
Description
Now, I put mongo.host1,mongo.host2,mongo.host3 ... in my db.properties file,and config the MongoClient bean in beans.xml of Spring, like this:
<bean id="mongoClient" ..>
<constructor-arg>
<list>
<bean id="m1" ../>
<bean id="m2" ../>
<bean id="m3" ../>
</list>
</bean>
if I add/remove host, I must change the two files,
So, why not we provide a constructor with one String param and parse it in method?
Thanks~