當前位置:
首頁 >
前端技术
> javascript
>内容正文
javascript
SpringBootTest报错:No qualifying bean of type...expected at least 1 bean which qualifies as autowire
生活随笔
收集整理的這篇文章主要介紹了
SpringBootTest报错:No qualifying bean of type...expected at least 1 bean which qualifies as autowire
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
已知:報錯信息為
Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'com....' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@javax.annotation.Resource(shareable=true, lookup=, name=, description=, authenticationType=CONTAINER, type=class java.lang.Object, mappedName=)}解:DAO、Service、Controller在同一個項目下的不同module開發后,使用@SpringBootTest測試時,測試類一定要寫在Application類所在的module
總結
以上是生活随笔為你收集整理的SpringBootTest报错:No qualifying bean of type...expected at least 1 bean which qualifies as autowire的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 眼角的那滴泪
- 下一篇: 股票分析需要安装的库