當(dāng)前位置:
首頁(yè) >
前端技术
> javascript
>内容正文
javascript
SpringBoot 报错Field XXX required a bean of type XXX that could not be found.
生活随笔
收集整理的這篇文章主要介紹了
SpringBoot 报错Field XXX required a bean of type XXX that could not be found.
小編覺(jué)得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.
場(chǎng)景
SpringBoot項(xiàng)目運(yùn)行時(shí)提示:
解決
首先查看service下是否有@Service注解
這里有。
然后找到啟動(dòng)類
修改前:
修改后:
添加:
@SpringBootApplication(scanBasePackages = {"service","dao","config"})?
總結(jié)
以上是生活随笔為你收集整理的SpringBoot 报错Field XXX required a bean of type XXX that could not be found.的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: SpringBoot中使用@Mapper
- 下一篇: IDEA中SpringBoot项目使用@