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

為了賬號安全,請及時(shí)綁定郵箱和手機(jī)立即綁定

dao層bean注入失敗

org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'app':

Unsatisfied dependency expressed through field 'userDOMapper': No qualifying bean of type [com.cut.dao.UserDOMapper] found for dependency [com.cut.dao.UserDOMapper]: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [com.cut.dao.UserDOMapper] found for dependency [com.cut.dao.UserDOMapper]: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}

https://img1.sycdn.imooc.com//5cced05f0001e4f710650469.jpg

https://img1.sycdn.imooc.com//5cced05f0001c0b812930493.jpg

https://img1.sycdn.imooc.com//5cced1170001765611530372.jpg

求大神解救一下,一直報(bào)這個錯誤,開始我完全照老師的代碼,報(bào)這個錯誤,后來我把接口類加上Component注解或者Repository注解反正能換的我都試過了,完全報(bào)同樣的錯誤,檢查了各個配置的路徑也沒有錯誤,代碼不報(bào)錯,編譯報(bào)錯。不知道問題出在哪,怎么解決??

正在回答

6 回答

把所有接口上的注解改成@Mapper問題解決

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

你這個問題解決了嗎?

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

https://img1.sycdn.imooc.com//5ceca4f000016a7609800599.jpg看看是這個問嗎

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

@Resource代替@autowried


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

這個好像是生成的UserDOMapper.xml和UserPasswordDOMapper.xml文件中重復(fù)生成了resultMap,然后刪掉重復(fù)的就好了,希望有幫助

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

qq_怎么就遲了_0 提問者

我刪過重復(fù)的了,還是不行誒,不過謝謝了
2019-05-08 回復(fù) 有任何疑惑可以回復(fù)我~

對userDoMapper變量進(jìn)行setter方式注入,試試

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

慕粉3169703

應(yīng)該是idea對spring語法檢測的警告級別,可以在Autowring for Bean Class中將Severity的級別由之前的error改成warning
2019-05-07 回復(fù) 有任何疑惑可以回復(fù)我~
#2

qq_怎么就遲了_0 提問者 回復(fù) 慕粉3169703

我試過降低警告級別了,但是沒有用啊,代碼不報(bào)錯,只是編譯運(yùn)行的時(shí)候報(bào)錯。還有如果用setter方法怎樣實(shí)現(xiàn)呢?userDOMapper是一個接口類也能用setter方法嗎?
2019-05-07 回復(fù) 有任何疑惑可以回復(fù)我~

舉報(bào)

0/150
提交
取消

dao層bean注入失敗

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

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

幫助反饋 APP下載

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

公眾號

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