org.springframework.beans.factory.BeanCreationException:Caused by: java.lang.IllegalArgumentExcep...

org.springframework.beans.factory.BeanCreationException:Caused by: java.lang.IllegalArgumentExcep..._第1张图片
image.png

org.springframework.beans.factory.BeanCreationException:Caused by: java.lang.IllegalArgumentExcep..._第2张图片
image.png

原因:我的UserService并不是接口,而是实现类
解决方法:将UserService 变成接口注入。
参考:
https://blog.csdn.net/Grit_ICPC/article/details/53572204
https://blog.csdn.net/ligeforrent/article/details/76033083

你可能感兴趣的:(org.springframework.beans.factory.BeanCreationException:Caused by: java.lang.IllegalArgumentExcep...)