Parameter 0 of constructor in XXX required a bean of type ‘XXX‘ that could not be found

我的问题如下:
Parameter 0 of constructor in XXX required a bean of type ‘XXX‘ that could not be found_第1张图片
原因目前我还未知,因为我对spring框架并不熟悉。
但大家想知道原因的,可以看一下这篇文章。https://blog.csdn.net/weixin_48033662/article/details/126257482
当然,这篇文章写的很透彻,但解决办法和我的不太相符把,我是忘了给service层的实现类加注解了,所以导致不行,很简单,在你的serviceimpl类上方加上下面的注解就可以了:

@Service

加完之后是这样的:
Parameter 0 of constructor in XXX required a bean of type ‘XXX‘ that could not be found_第2张图片

你可能感兴趣的:(教程,经验分享)