Hi,
After loading the context through application.xml. Then autowired annotation is working when the object is created through context. Otherwise if we created component object with new Operator autowired property is not working.
Comment From: wilkinsona
Otherwise if we created component object with new Operator autowired property is not working.
This is the expected behaviour. If you create the object yourself using new
then Spring does not know about the object and cannot, therefore, inject dependencies into it.
If you have any further questions, please follow up on Stack Overflow or Gitter. As mentioned in the guidelines for contributing, we prefer to use GitHub issues only for bugs and enhancements.