Unsatisfied dependency expressed through field 'baseMapper'; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'com.memory.memoryiconbackend.mapper.WallpaperMapper' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}
id,name,url,
type,tags,create_time,
update_time,is_delete,user_id
@Mapper
public interface WallpaperMapper extends BaseMapper {
}
@SpringBootApplication
@MapperScan("com.memory.memoryiconbackend.mapper.WallpaperMapper")
public class MemoryIconBackendApplication {
public static void main(String[] args) {
SpringApplication.run(MemoryIconBackendApplication.class, args);
}
}
/**
* mybatis-plus 分页配置类
*/
@Configuration
@MapperScan("com.memory.memoryiconbackend.mapper.WallpaperMapper")
public class MybatisPlusConfig {
@Bean
public MybatisPlusInterceptor mybatisPlusInterceptor() {
MybatisPlusInterceptor interceptor = new MybatisPlusInterceptor();
interceptor.addInnerInterceptor(new PaginationInnerInterceptor(DbType.MYSQL));
return interceptor;
}
}