坠梦87 2022-06-23 23:54 采纳率: 100%
浏览 67
已结题

这么晚了有打扰到各位代码展示我控制台出错还有service报错老长一堆我也看不太明白还请大家多多指导

img


org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'billInfoController': Unsatisfied dependency expressed through field 'billInfoService'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'billInfoServiceImpl': Unsatisfied dependency expressed through field 'billInfoMapper'; nested exception is org.springframework.

img


beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'com.zch.mapper.BillInfoMapper' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}代码报这个错误太长了没截下来

img

img

  • 写回答

5条回答 默认 最新

  • 一头小山猪 一头小山猪(个人IP)官方账号 2022-06-24 01:49
    关注

    你的这个问题是Mapper的映射问题,因为你的Controller里面需要用到Service,Service里面使用到了Mapper。
    根据报错信息,Mapper没有找到一个与之匹配的实体类。看你应该使用的是MyBatis,所以这里的Mapper应该是和你自己定义的xml是对应的,你的文件中也有这个xml文件,所以检查下Mapper的自动扫包,或者映射相关的配置。
    有帮助请采纳,还有不懂的可以继续追问~

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(4条)

报告相同问题?

问题事件

  • 系统已结题 12月30日
  • 已采纳回答 12月22日
  • 创建了问题 6月23日

悬赏问题

  • ¥20 西门子S7-Graph,S7-300,梯形图
  • ¥50 用易语言http 访问不了网页
  • ¥50 safari浏览器fetch提交数据后数据丢失问题
  • ¥15 matlab不知道怎么改,求解答!!
  • ¥15 永磁直线电机的电流环pi调不出来
  • ¥15 用stata实现聚类的代码
  • ¥15 请问paddlehub能支持移动端开发吗?在Android studio上该如何部署?
  • ¥20 docker里部署springboot项目,访问不到扬声器
  • ¥15 netty整合springboot之后自动重连失效
  • ¥15 悬赏!微信开发者工具报错,求帮改