reading a dynamic property list into a spring managed bean

后端 未结 5 1624
醉梦人生
醉梦人生 2020-12-02 20:38

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:

machin         


        
5条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-02 21:04

    If you make the property "machines" a String array, then spring will do it automatically for you

    machines=B,C,D
    
    
    
    public void setMachines(String[] test) {
    

提交回复
热议问题