org.springframework.beans.factory.beandefinitionstoreexception: ioexception parsing xml
document from class path resource [com/herman/ss/controller]; nested exception is java.io.filenotfoundexception:
class path resource [com/herman/ss/controller] cannot be opened because it does not exist
nested exception is org.xml.sax.saxparseexception: cvc-complex-type.2.4.c: the matching wildcard is strict,
but no declaration can be found for element 'util:list'.
xmlns:util="http://www.springframework.org/schema/util" 去掉,因为schema中不存在util命名
org.springframework.beans.factory.nouniquebeandefinitionexception:
no qualifying bean of type [com.herman.ss.pojo.person] is defined:
expected single matching bean but found 7: person0,person1,person2,person3,person4,person5,person6
at org.springframework.beans.factory.support.defaultlistablebeanfactory.getbean(defaultlistablebeanfactory.java:313)
at org.springframework.context.support.abstractapplicationcontext.getbean(abstractapplicationcontext.java:985)
at com.herman.ss.test.test0.test1(test0.java:35)
at com.herman.ss.test.test0.main(test0.java:111)
org.springframework.beans.factory.parsing.beandefinitionparsingexception:
configuration problem: bean name 'a' is already used in this <beans> element
解决方法:把重复的名字改个名字即可。
十一、bean的自动加载找不到相对应的bean问题
org.springframework.beans.factory.nosuchbeandefinitionexception: no qualifying bean of type [com.yyc.ym.biz.yycbiz] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. dependency annotations: {@org.springframework.beans.factory.annotation.autowired(required=true)}