Announcement Announcement Module
Collapse
No announcement yet.
how to read in a dynamic list of properties? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • how to read in a dynamic list of properties?

    Hi, I've been searching but cannot find these steps. I hope I'm missing something obvious.

    I have a properties file with the following contents:

    Code:
    machines=A,B
    I have another file like that but having a different amount like this:

    Code:
    machines=B,C,D
    My question is how do I load this variable length machines variable into a bean in my spring config?

    something like this:

    Code:
    <property name="machines" value="${machines}";
    where machines is an array or list in my java code..I can define it however I want if I can figure out how to do this.

    Basically I'd rather have spring do the parsing and stick each value into a list element instead of me having to write something that reads in the full machines string and do the parsing myself (with the comma delimiter) to put each value into an array or list. Is there an easy way to do this that I'm missing? Thank you!

  • #2
    Not sure if this helps, but seems like you are trying to do something similar to...

    http://forum.springsource.org/showthread.php?t=105043

    Comment

    Working...
    X