Struts2 Action中使用注解注入调用service
//struts2中Action如果需要使用spring的注解注入,则需要将Action交给spring管理。1.需要引入jar包中有xml配置文件其中设置了ObjectFactory为spring 这个struts会自动加载不用设置2.需要在Action类中增加注释@Component("TestAction") @Scope("prototype")