I am using spring+struts2 and I have a large number of action classes that required a single service (mailService). Instead of injecting service into these action classes, I am wondering is there a way to create a parent class and inject the resources and then have all these classes extending the parent. So I do no need to repeat the injection in each class.
Thanks in advance
try defining a baseClass with a setter method for the mailService. your action classes can all extend this baseClass.
ie