I am using another application's service,since everything is already made and done.
My application is to use the interface class inside the application jar. but something seem to be wrong when this code is called.
BeanFactory factory = new ClassPathXmlApplicationContext( "/Context-Controller.xml");
even if my Context-Controller.xml
has this code
<context:component-scan base-package="com.package" />
My error.
Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No unique bean of type [com.package.ServiceIamUsing] is defined: Unsatisfied dependency of type [interface com.package.ServiceIamUsing]: expected at least 1 matching bean
this is how i autowired it on my applciation.
public class MyAppDao implements IMyAppDao {
@Autowired
@Qualifier("serviceIamUsing")
private ServiceIamUsing serviceIamUsing;
//More codes here
}