No qualifying bean of type [com.XX.mapper.SysNameMapper ] found for dependency

简介: No qualifying bean of type [com.XX.mapper.SysNameMapper ] found for dependency

问题:是因为没有扫描到Mapper

解决:

1.在类上加注解

@Mapper
public interface SysNameMapper extends BaseMapper<SysName> {
 
}

2.启动类上没有扫描到

@SpringBootApplication
@MapperScan("com.sch.**.*.mapper")//表示任意包
public class ExcelApplication extends SpringBootServletInitializer {


相关文章
|
Java Maven
MapStruct - Couldn‘t retrieve @Mapper annotation
MapStruct - Couldn‘t retrieve @Mapper annotation
1835 0
|
Java 数据库连接 mybatis
【Spring常见错误】No qualifying bean of type
📋📋 精彩摘要:MyBatis 核心配置文件(xxxConfig.xml),该文件配置了MyBatis的一些全局信息,,包含数据库连接信息和MyBatis运行时所需的各种特性,以及设置和响应MyBatis行为的一些属性。本文将深入浅出的介绍MyBatis核心配置文件中常用的标签配置。
4146 0
|
29天前
Unsatisfied dependency expressed through field ‘baseMapper‘
Unsatisfied dependency expressed through field ‘baseMapper‘
18 2
|
5月前
|
Java 容器 Spring
No qualifying bean of type或Unsatisfied dependency expressed through field ‘XXXService‘或@Autowired 注入
No qualifying bean of type或Unsatisfied dependency expressed through field ‘XXXService‘或@Autowired 注入
36 0
|
6月前
|
Java 编译器
解决NoSuchBeanDefinitionException: No qualifying bean of type ‘bean.User‘ available
解决NoSuchBeanDefinitionException: No qualifying bean of type ‘bean.User‘ available
|
8月前
|
Java 数据库连接 Spring
spring整合 mybatis时 SqlSessionFactoryBean的一个小报错:Bean named ‘sqlSessionFactory‘ is expected to be of ty
spring整合 mybatis时 SqlSessionFactoryBean的一个小报错:Bean named ‘sqlSessionFactory‘ is expected to be of ty
250 0
|
9月前
|
NoSQL Java Redis
Unsatisfied dependency expressed through field /Injection of autowired dependencies failed 解决方法
根据报错的关键字,大底的意思就是依赖方面的问题。
113 0
|
9月前
Error creating bean with name ‘userServiceImpl‘: Unsatisfied dependency expressed through field ‘bas
Error creating bean with name ‘userServiceImpl‘: Unsatisfied dependency expressed through field ‘bas
187 0
记一个SpringBoot中属性注入失败的问题Consider defining a bean of type &#39;&#39;&#39; in your configuration...
记一个SpringBoot中属性注入失败的问题Consider defining a bean of type &#39;&#39;&#39; in your configuration...
228 0
|
10月前
|
Java
springboot3 解决:Could not autowire. No beans of ‘JavaMailSender‘ type found
因为 spring-boot-starter-mail 默认使用某些包发生了变化,在 2.2.xx 版本前后不一,解决对应bug
273 0