第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時綁定郵箱和手機立即綁定

報錯Caused by: java.lang.NoSuchMethodException: com.imooc.ioc.injection.service.InjectionServiceImpl.<init>()

在InjectionServiceImpl類里面構(gòu)造注入和設(shè)值注入同時存在,把spring-injection.xml文件中的構(gòu)造注入配置注釋掉,運行TestInjection類里面的testSetter()設(shè)值注入方法,報異常

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'injectionService' defined in class path resource [spring-injection.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [com.imooc.ioc.injection.service.InjectionServiceImpl]: No default constructor found; nested exception is java.lang.NoSuchMethodException: com.imooc.ioc.injection.service.InjectionServiceImpl.<init>()

http://img1.sycdn.imooc.com//5a24f5da0001333507160498.jpg

http://img1.sycdn.imooc.com//5a24f5db00010acd09520495.jpg


正在回答

2 回答

你在xml文件中用ctrl+鼠標(biāo)移動到com.imooc....這一塊看一下你的路徑有沒有出錯。

0 回復(fù) 有任何疑惑可以回復(fù)我~

把構(gòu)造注入那段代碼注釋掉看看呢?會不會是在getBean的時候構(gòu)造注入但xml里沒有構(gòu)造注入的配置造成的

0 回復(fù) 有任何疑惑可以回復(fù)我~

舉報

0/150
提交
取消

報錯Caused by: java.lang.NoSuchMethodException: com.imooc.ioc.injection.service.InjectionServiceImpl.<init>()

我要回答 關(guān)注問題
微信客服

購課補貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學(xué)習(xí)伙伴

公眾號

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號