8
上下文中的多个软件包:component-scan,spring config
如何在context:component-scanelement的spring-servlet.xml文件中添加多个包? 我努力了 <context:component-scan base-package="z.y.z.service" base-package="x.y.z.controller" /> 和 <context:component-scan base-package="x.y.z.service, x.y.z.controller" /> 和 <context:component-scan base-package="x.y.z.service" /> <context:component-scan base-package="x.y.z.controller" /> 但出现错误: org.springframework.beans.factory.NoSuchBeanDefinitionException: No matching bean of type [x.y.z.dao.daoservice.LoginDAO] found for dependency:
185
java
spring
component-scan