I have a class (Class ABC) that\'s instantiated by calling the constructor. Class ABC in turn has a helper class (Class XYZ) injected using auto-wired.
Ours is a Sp
Autowiring won't work because class ABC is not managed by Spring. You could make Spring manage ABC by using one of the @Component annotations (@Component, @Service, @Controller, etc) above the class definition, and then using context:component-scan in your application context XML, or go old school and just define the bean directly in your application context.
If for some reason you can't make Spring manage class ABC, you can load the application context in ABC using something like:
ApplicationContext context = new ClassPathXmlApplicationContext("path/to/applicationContext.xml");
and then use:
XYZ someXyz = (XYZ) context.getBean("MyXYZ");
to manually set the bean value.