这么晚了有打扰到各位代码展示我控制台出错还有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

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

No qualifying bean of type 'com.zch.mapper.BillInfoMapper' available这个报错后的部分全部发出来看看

看下Mapper接口有@Mapper注解嘛

。。。。。