spring: set property of one bean by reading the property of another bean?

前端 未结 3 2167
别跟我提以往
别跟我提以往 2020-12-05 13:22

Is it possible to set the property of one bean by reading the property of another bean? For instance, suppose I had:

class A {
   void setList(List list);
}
         


        
3条回答
  •  心在旅途
    2020-12-05 14:15

    in addition to @Kevin's answer if you are using spring 3.0 it is possible to do this with the new spring expression language

    
        
    
    

    spring 3.0 documentation

提交回复
热议问题