本帖最后由 zakaz168 于 2012-01-16 17:59:44 编辑

解决方案 »

  1.   

    在用第三种方法实例化bean时才报错,前面两个都可以正常运行。
      

  2.   

     No matching factory method found: factory bean 'personFactory'; factory method 'createPersonServiceBean'  
    xml里面的这条配置有问题:<bean id="person3" factory-bean="personFactory" factory-method="createPersonServiceBean" /> 
    错误原因说没有这种样的 factorybean 
      

  3.   

    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'person3' defined in class path resource [bean.xml]: No matching factory method found: factory bean 'personFactory'; factory method 'createPersonServiceBean'
    没见你有配置person3的bean,报错的信息应该不会是这个,所以建议你仔细看看你xml的路劲是不是引入到了别的xml文件
      

  4.   

    person3被注释掉了 但是一不注释就报错了