How can I add multiple packages in spring-servlet.xml file in context:component-scan
element?
I have tried
<context:component-scan base-package="z.y.z.service" base-package="x.y.z.controller" />
and
<context:component-scan base-package="x.y.z.service, x.y.z.controller" />
and
<context:component-scan base-package="x.y.z.service" />
<context:component-scan base-package="x.y.z.controller" />
but got error:
org.springframework.beans.factory.NoSuchBeanDefinitionException: No matching bean of type [x.y.z.dao.daoservice.LoginDAO] found for dependency: