10:28:33.416 [main] WARN org.springframework.context.support.GenericXmlApplicationContext -- Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'galaxy' defined in class path resource [applicationContext.xml]: Could not resolve matching constructor on bean class [test.GalaxyPhone] (hint: specify index/type/name arguments for simple parameters to avoid type ambiguities. You should also check the consistency of arguments when mixing indexed and named arguments, especially in case of bean definition inheritance)

Exception in thread "main" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'galaxy' defined in class path resource [applicationContext.xml]: Could not resolve matching constructor on bean class [test.GalaxyPhone] (hint: specify index/type/name arguments for simple parameters to avoid type ambiguities. You should also check the consistency of arguments when mixing indexed and named arguments, especially in case of bean definition inheritance)

 

원인 및 해결방안

매칭되는 생성자가 존재하지 않음

해결을 위해 같은 이름의 생성자를 추가함

+ Recent posts