在學習Spring程序中使用型別獲取物件出現以下錯誤:org.springframework.beans.factory.NoUniqueBeanDefinitionException: No qualifying bean of type 'com.atguigu.pojo.Person' available: expected single matching bean but found 2: p1,p2

原因分析
這是因為組態檔中有兩個相同資料型別的bean物件了,不能使用型別獲取物件的方式,故而最好使用獲取id獲取物件,
轉載請註明出處,本文鏈接:https://www.uj5u.com/houduan/76700.html
標籤:Java
