Exception encountered during context initialization - cancelling refresh attempt: org.springframewor

叁歲伎倆 2021-10-03 03:06 453阅读 0赞

Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'receiptService': Unsatisfied dependency expressed through field 'baseMapper'; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'com.*.*.*.mapper.ReceiptMapper' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}
今天整合项目结构时发现启动报错,刚开始以为是在serviceimpl实现层忘加注解,但看了一下是加了的。后来忽然想起来在启动类上加@MapperScan即可,报错轻松解决

发表评论

表情:
评论列表 (有 0 条评论,453人围观)

还没有评论,来说两句吧...

相关阅读