怎么说,我也是SSM老司机了,竟然在小阴沟头翻了船
解析:没有找到合格的IoFactoryService,首先到applicationContext-service.xml中看看有没有配置组件扫描
果然,问题解决了。
org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [com.taotao.service.ItemService] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}
<!-- 扫描包加载Service实现类 -->
<context:component-scan base-package="com.ankele.service"></context:component-scan>
很明显,配置了的。没有怀疑其他的配置信息有问题,因为异常已经表明——没有对应的Service。那很有可能是ServiceImplement类没有注解@Service了。
果然,问题解决了。