struts中配置了ACTION,但是action无法使用

具体原因经排查是因为[color=darkred]在ACTION中用@autowired注入了service[/color]

以下是struts.xml中配置的myPageAction



以下是MyPageAction注入service的代码

@Autowired
private MyPageEntityManager myPageEntityManager;

当我在前台调用此action中的方法时,完全没有反应,但是去掉@Autowired就可以输出一些东西,不过此时service就不能用了(也就是myPageEntityManager)。

请问使用@autowired需要配置哪些地方吗?