The SpringWirer class provides a static method that, given an object, will wire it into the existing application context and set the spring beans needed
public class Jedi {
private Force force;
public Jedi() {
// wire this object up
SpringWirer.wireBean(this);
force.push();
}
// set the Force spring bean
public void setForce(Force force) {
this.force = force;
}
}
In this example, the Force object can be accessed because it is a bean defined in Spring. At runtime, the SpringWirer.wireBean(this) call will wire the object into Spring, setting the Force object using the setter method
Sproing version 0.3.1alpha is available now from Sith Open Source