springMVC出错No bean named 'INVO_myReqUrl' is defined

   阅读
springMVC报错No bean named 'INVO_myReqUrl' is defined
beans.xml如下:
<!--2.包扫描dao,service-->
<context:component-scanbase-package="cn.itcast.jk.dao,cn.itcast.jk.service"/>
<!--扫描Component-->
<context:component-scanbase-package="cn.itcast.jk.dao,cn.itcast.jk.invocation">
<context:include-filtertype="annotation"expression="org.springframework.stereotype.Component"/>
</context:component-scan>


invocation如下:
@Component("INVO_myReqUrl")
publicclassHomepageInvocationimplementsBaseInvocation{
publicInvocationResultqueryHomepageShowInfo(InvocationContextcontext){
System.out.println("返回对象了,擦擦擦");
returnnull;

}
}

报错如下:
org.springframework.beans.factory.NoSuchBeanDefinitionException:Nobeannamed'INVO_myReqUrl'isdefined

这到底什么情况啊?谢谢


------解决思路----------------------
getBean方法的参数你瞧瞧,有你这样写的么?
阅读