OK, for the sake of completeness, here's HelloWorld:
Code:
public class HelloWorld {
public HelloWorld() {
super();
InputStream is = getClass().getResourceAsStream("spring.xml");
XmlBeanFactory bf = new XmlBeanFactory(is);
Printy p = (Printy) bf.getBean("first");
p.print();
}
public static void main(String[] args) {
HelloWorld h = new HelloWorld();
}
}
Now here's First:
Code:
package eg;
public class First implements Printy {
private Append append;
public void setAppend(Append append) {
this.append = append;
}
public void print() {
System.out.println(append.append("Hello"));
}
}
And here's Appendix:
Code:
package eg;
public class Appendix implements Append {
private String word;
public void setWord(String word) {
this.word = word;
}
public String append(String a) {
return a+" "+word;
}
}
And here's Append interface FWIW:
Code:
package eg;
public interface Append {
String append(String a);
}
The error is flagged in this line:
Code:
<property name="word"><value>World</value></property>
Nothing too weird there, I think ...