控制台错误日志信息如下:
Could not autowire field: private com.ujiuye.mapper.TbBrandMapper com.youlexuan.sellergoods.service.impl.BrandServiceImpl.brandMapper; nested exception is org.springframework.beans.factory
出错原因:@Autowired注解注入Service或者Mapper时失败,在spring的配置文件中扫描不到mapper下的接口文件,可能就是路径写错了。
检查spring配置文件路径:(value属性中的值)
maven项目异常之Could not autowire field
最新推荐文章于 2021-11-30 15:25:42 发布