Error creating bean with name ‘**ServiceImpl‘: Unsatisfied dependency expressed through field ‘mappe
错误org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘**ServiceImpl’: Unsatisfied dependency expressed through field ‘**TableMapper’;解决办法:List item
·
springboot项目启动报错
错误
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘**ServiceImpl’: Unsatisfied dependency expressed through field ‘**TableMapper’;
解决办法:
提供一个别的博客没有提及的
首先 看下自己的启动类mapper是否设置了扫描
如果设置的话看看@MapperScan和@ComponentScan有没有同时用
同时用的话要有规范的
规范详见博客:[@MapperScan和@ComponentScan区别与使用方法]
@MapperScan("com.**.test.mapper")
@ComponentScan
// MapperScan 与ComponentScan不能直接同时用 如果要同时用的话 需要 @MapperScan(basePackages = {})这样写
更多推荐
已为社区贡献3条内容
所有评论(0)