2018-4-13 10:29:55 org.apache.catalina.core.ApplicationContext log
严重: Error creating bean with name ‘materController’: Injection of autowired
dependencies failed;Could not autowire field: No qualifying bean of type
[com.cn.service.RelationService] found for dependency: expected at least 1 bean
which qualifies as autowire candidate for this dependency.

原因:bean没有注入。
<!-- 自动扫描(自动注入) --> <context:component-scan base-package="com.imut.service" />
@Service("userService") public class UserServiceImpl implements IUserService {
private UserMapper userMapper; public UserMapper getUserMapper() { return
userMapper; }@Autowired public void setUserMapper(UserMapper userMapper) { this
.userMapper = userMapper; }
解决:
<!-- 自动扫描(自动注入) --> <context:component-scan base-package="com.imut.serviceImpl"
/>

友情链接
KaDraw流程图
API参考文档
OK工具箱
云服务器优惠
阿里云优惠券
腾讯云优惠券
华为云优惠券
站点信息
问题反馈
邮箱:ixiaoyang8@qq.com
QQ群:637538335
关注微信