Why not provide a constructor with a String-Multi hosts?

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Done
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      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~

            Assignee:
            Unassigned
            Reporter:
            yangyameng
            None
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: