Hi
friends
i have a controller
and registration interfaceCode:@Controller public class TestController { private final Registration registration; @Autowired() public TestController(Registration registration) { this.registration = registration; }
and it is implimented in RegistrationImplCode:public interface Registration { public int register(String name, String password, String displayname, String email) throws DataAccessException;
and when i run the application i got following exception
org.springframework.beans.factory.UnsatisfiedDepen dencyException: Error creating bean with name 'testController' defined in ServletContext resource [/WEB-INF/image-servlet.xml]: Unsatisfied dependency expressed through constructor argument with index 0 of type [org.springframework.samples.imagedb.Registration]: No unique bean of type [org.springframework.samples.imagedb.Registration] is defined: Unsatisfied dependency of type [interface org.springframework.samples.imagedb.Registration]: expected at least 1 matching bean
org.springframework.beans.factory.support.Construc torResolver.createArgumentArray(ConstructorResolve r.java:543)
org.springframework.beans.factory.support.Construc torResolver.autowireConstructor(ConstructorResolve r.java:178)
org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.autowireConstructor(Abs tractAutowireCapableBeanFactory.java:957)
org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.createBeanInstance(Abst ractAutowireCapableBeanFactory.java:869)
org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.doCreateBean(AbstractAu towireCapableBeanFactory.java:514)
org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory$1.run(AbstractAutowireC apableBeanFactory.java:485)
java.security.AccessController.doPrivileged(Native Method)
what is my pblm plz help
adv thanks


Reply With Quote