三大框架整合异常 Unable to instantiate Action

exception

Unable to instantiate Action, lee.you.employee.action.LoginAction, defined for 'emp' in namespace '/login'Error creating bean with name 'lee.you.employee.action.LoginAction': Injection of resource methods failed; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'employeeManager' is defined
com.opensymphony.xwork2.DefaultActionInvocation.createAction(DefaultActionInvocation.java:307)
com.opensymphony.xwork2.DefaultActionInvocation.init(DefaultActionInvocation.java:388)
com.opensymphony.xwork2.DefaultActionProxy.prepare(DefaultActionProxy.java:187)
org.apache.struts2.impl.StrutsActionProxy.prepare(StrutsActionProxy.java:61)
org.apache.struts2.impl.StrutsActionProxyFactory.createActionProxy(StrutsActionProxyFactory.java:39)
com.opensymphony.xwork2.DefaultActionProxyFactory.createActionProxy(DefaultActionProxyFactory.java:47)
org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:478)
org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:77)
org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:91)

没在spring里定义名为employeeManager的bean追问

@Component("employeeManager")
public class EmployeeManagerImpl implements EmployeeManager {
我定义了啊

追答

你加context那些配置了吗
auto scan之类的

追问

好像找到了,我先试试

温馨提示:答案为网友推荐,仅供参考