Hope someone can assist with an explanation regarding the following
If I have a Concrete Class with a single dependency, and annotate as @Configurable (autowiring by name for convenience), the dependency is injected.
If I extract the dependent property, and the getter and setter into a new Super Class, and instantiate the object as follows, the dependency is not injected.
If, however, I instantiate the object as follows, the dependency is injectedCode:SuperClass concreteClass = new ConcreteClass();
Annotating the super class with @Configurable (whether abstract or not) makes no difference.Code:ConcreteClass concreteClass = new ConcreteClass();
I'm sure there is a good reason for this, but don't know what it is!
Thanks Marc


Reply With Quote