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

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

運(yùn)行程序報(bào)錯,,錯誤的創(chuàng)建bean

我service的測試類ok的,也能訪問index.jsp,就是訪問list.jsp報(bào)錯,,哪位大神幫忙看一下,,謝謝!


org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'seckillServiceImpl': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private org.Seckill.dao.SeckillDao org.Seckill.service.impl.SeckillServiceImpl.seckillDao; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [org.Seckill.dao.SeckillDao] 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)}

??


Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [org.Seckill.dao.SeckillDao] 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)}

web.xml

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

spring-web.xml

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

正在回答

1 回答

你的SeckillServiceImpl這個類是不是沒有加注解,比如:@Service。不加注解的話,BeanFactory就不會知道他是一個Bean,這樣,在SeckillController 中使用@Autowired注解注入的時候,Spring容器就會找不到對應(yīng)的Bean

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

鯊魚尖椒 提問者

加過了,xml配置寫錯了
2018-09-12 回復(fù) 有任何疑惑可以回復(fù)我~

舉報(bào)

0/150
提交
取消

運(yùn)行程序報(bào)錯,,錯誤的創(chuàng)建bean

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

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

幫助反饋 APP下載

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

公眾號

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