报错:Error creating bean with name ‘Controller‘,Unsatisfied dependency expressed through field ‘Servic

报错来源:初始化项目生成代码注解不全 或 路径有错报错信息:org.springframework.beans.factory.UnsatisfiedDependencyException:

报错来源:

  1. 初始化项目
  2. 生成代码注解不全 或 路径有错

报错信息:

org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘sysUserController’: Unsatisfied dependency expressed through field ‘sysUserService’; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘sysUserService’: Unsatisfied dependency expressed through field ‘baseMapper’; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type ‘com.xyz66.mapper.SysUserMapper’ available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}

解决方案:

1.添加@MapperScan扫描mapper注解

2.添加@Mapper注解

发布者:admin,转转请注明出处:http://www.yc00.com/web/1755028759a5228723.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信