I'm having the same issue. I have a custom action mapper which I've configured Struts 2 to use in the struts.xml:
<bean type="org.apache.struts2.dispatcher.mapper.ActionMapper" name="PracticeContextMapper" class="com.practs.struts.mapper.PracticeContextMapper" />
<constant name="struts.mapper.composite" value="PracticeContextMapper,struts" />
<constant name="struts.mapper.class" value="composite" />
Then, I put in an autowired property (with accessor methods) in my new custom action mapper:
public class PracticeContextMapper implements ActionMapper
{
@Autowired
private PracticeService practiceService;
@Override
public ActionMapping getMapping(HttpServletRequest request,
ConfigurationManager configManager)
{
...
The service bean I want to inject is set up in my applicationContext file propertly:
<bean id="practiceService" class="com.practs.bizObjects.practices.PracticeServiceImpl" />
I'm doing the exact same thing with all my struts actions, and Spring is injecting everything just fine. Unfortunately, it won't do any injection on the ActionMapper. Is this a limitation of the Struts-Spring plugin? Am I missing something?
Thanks in advance.