springboot启动报错
o.s.b.c.e.AnnotationConfigEmbeddedWebApplicationContext -Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘followPaintController’: Unsatisfied dependency expressed through field ‘followPaintService’; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘followPaintServiceImpl’: Unsatisfied dependency expressed through field ‘followPaintMapper’; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type ‘com.portalapp.module.art.followpaint.mapper.FollowPaintMapper’ available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}
APPLICATION FAILED TO START
Description:
Field followPaintMapper in com.portalapp.module.art.followpaint.service.impl.FollowPaintServiceImpl required a bean of type ‘com.portalapp.module.art.followpaint.mapper.FollowPaintMapper’ that could not be found.
Action:
Consider defining a bean of type ‘com.portalapp.module.art.followpaint.mapper.FollowPaintMapper’ in your configuration.
原因 mapperscan没扫描到mapper
改为
ok 解决