
Consider defining a bean of type'xxx'in your configuration的解决方法
在做测试的时候写了一个controller类,但是发现在启动时发生了错误:`Action:
Consider defining a bean of type ‘lore.miniwechat.service.ArticleService’ in your configuration. `
之前看到有文章说是在service接口上面添加注解,试过无效,然后又在网上看了很多相关的文章后,发现在impl的类上面忘记添加@Service注解了。
@Service public class ArticleServiceImpl implements ArticleService {
如果有和我出现同样错误的伙伴可以试试
👁️ 阅读量:0
© 版权声明:本文《Consider defining a bean of type'xxx'in your configuration的解决方法》内容均为本站精心整理或网友自愿分享,如需转载请注明原文出处:https://www.zastudy.cn/wen/1686552154a289833.html。