Exception encountered during context initialization - cancelling refresh attempt: org.springframewor
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
即可,报错轻松解决
还没有评论,来说两句吧...