Bean named 'articleService' must be of type [com.cst.znkg.service.ArticleService], but was actually of type [com.cst.znkg.service.impl.ArticleServiceImpl]
Error creating bean with name 'userAction': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.BeanNotOfRequiredTypeException: Bean named 'articleService' must be of type [com.cst.znkg.service.ArticleService], but was actually of type [com.cst.znkg.service.impl.ArticleServiceImpl]
Unable to instantiate Action, userAction, defined for 'user_infoList' in namespace '/'Error creating bean with name 'userAction': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.BeanNotOfRequiredTypeException: Bean named 'articleService' must be of type [com.cst.znkg.service.ArticleService], but was actually of type [com.cst.znkg.service.impl.ArticleServiceImpl]
File: org/springframework/beans/factory/support/AbstractBeanFactory.java
在做项目的时候,前期偷懒,为了方便都把service给写了出来,但是serviceimpl却没有实现对应的service方法,然后在配置那又注入了,所以导致了这种问题。
解决方法:就是补全。