Tag: 组件扫描

上下文中的多个包:组件扫描,弹簧configuration

如何在context:component-scan spring-servlet.xml文件中添加多个包context:component-scan元素? 我努力了 <context:component-scan base-package="zyzservice" base-package="xyzcontroller" /> 和 <context:component-scan base-package="xyzservice, xyzcontroller" /> 和 <context:component-scan base-package="xyzservice" /> <context:component-scan base-package="xyzcontroller" /> 但有错误: org.springframework.beans.factory.NoSuchBeanDefinitionException: No matching bean of type [xyzdao.daoservice.LoginDAO] found for dependency: