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

exceptionUnabletoinstantiateAction,lee.you.employee.action.LoginAction,definedfor'emp... 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)
展开
 我来答
百度网友5195152
2011-10-23 · TA获得超过1164个赞
知道大有可为答主
回答量:1314
采纳率:0%
帮助的人:718万
展开全部
没在spring里定义名为employeeManager的bean
更多追问追答
追问
@Component("employeeManager")
public class EmployeeManagerImpl implements EmployeeManager {
我定义了啊
追答
你加context那些配置了吗
auto scan之类的
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式