在做测试的时候写了一个controller类,但是发现在启动时发生了错误:`Action:

Consider defining a bean of type ‘lore.miniwechat.service.ArticleService’ in your configuration.
`

之前看到有文章说是在service接口上面添加注解,试过无效,然后又在网上看了很多相关的文章后,发现在impl的类上面忘记添加@Service注解了。

@Service public class ArticleServiceImpl implements ArticleService {

如果有和我出现同样错误的伙伴可以试试

更多推荐

Consider defining a bean of type'xxx'in your configuration的解决方法