<p>I want to do something like the following in spring:</p>

<pre><code>&lt;beans&gt;
    ...
    &lt;bean id="bean1" ... /&gt;
    &lt;bean id="bean2"&gt;
        &lt;property name="propName" value="bean1.foo" /&gt;
...
</code></pre>

<p>I would think that this would access the getFoo() method of bean1 and call the setPropName() method of bean2, but this doesn't seem to work.</p>

I think you have to inject bean1, then get
```
foo
```
manually because of a timing issue. When does the framework resolve the value of the target bean?
You could create a pointer bean and configure that.
```
```
class SpringRef {
  private String targetProperty;
  private Object targetBean;

  //getters/setters

  public Object getValue() {
    //resolve the value of the targetProperty on targetBean. 
  }
}
```
```
Common-BeanUtils
should be helpful.