为什么在eclipse当中,第一种注入list的方式会报错,而第二种不会?
为什么在eclipse当中,第一种注入list的方式会报错,而第二种不会?
为什么在eclipse当中,第一种注入list的方式会报错,而第二种不会?
2019-04-17
我第一种注入list也会报错
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'myBean': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire method: public void springzhuru.MyBean.setStringList(java.util.List); nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [java.lang.String] found for dependency [collection of java.lang.String]: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {}
举报