bean id="foo" class="com.ems.samples.spring.Foo"
property name="bar" ref="bar"/
/bean
bean id="bar" class="com.ems.samples.spring.Bar"
public class Foo {
private Bar bar;
public String getMessage() {
return "Foo" + bar.getMessage();
}
public void setBar(Bar bar) {
this.bar = bar;
}
}
public class Bar {
public String getMessage() {
return "Bar";
}
}