多次在配置spring并测试的时候发生如下错误
org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'xx' is defined
发生错误的主要原因:1、xxbean是否注入或者名字id是否写错。
2、spring配置文件中的<context:component-scan base-package="cn.spring.*"/>中base-package是否没有扫描到指定的包