今天写微服务项目的时候,启动遇到这个问题,困扰了很久,直到最后我才发现,controller层,service层,model层的目录需要保持一致,不然就不能被springboot扫描到.

一、问题

这句话大概意思就是:

Description:在你的UsersController类下面需要获取的UsersService类型的这个bean不能被找到

下面给你的建议就是:

Action:在配置类或者配置文件中定义一个UsersService的类型的bean

二.发现问题

api层的media写成meida了

package com.xuecheng.media.service;import com.xuecheng.media.model.po.MediaProcess;import java.util.List;/*** @author Mr.M* @version 1.0* @description TODO* @date 2022/10/16 15:11*/
public interface MediaFileProcessService {/*** @param shardIndex 分片序号* @param shardTotal 分片总数* @param count      获取记录数* @return java.util.List<com.xuecheng.media.model.po.MediaProcess>* @description 获取待处理任务* @author Mr.M* @date 2022/9/14 14:49*/public List<MediaProcess> getMediaProcessList(int shardIndex, int shardTotal, int count);/*** @param taskId   任务id* @param status   任务状态* @param fileId   文件id* @param url      url* @param errorMsg 错误信息* @return void* @description 保存任务结果* @author Mr.M* @date 2022/10/15 11:29*/void saveProcessFinishStatus(Long taskId, String status, String fileId, String url, String errorMsg);
}

Consider defining a bean of type ‘com.xingchen.media.service.MediaFileService‘ in your configuration相关推荐

  1. Consider defining a bean of type ‘com.xg.stupro.service.StudentService‘ in your configuration.

    1.运行sprring boot项目时,出现这个错误:Consider defining a bean of type 'com.xg.stupro.service.StudentService' i ...

  2. Consider defining a bean of type ‘com.nclg.mall.service.AdminService‘ in your configuration.

    问题描述 使用spring boot分模块开发时启动application出现错误 Consider defining a bean of type 'com.nclg.mall.service.Ad ...

  3. Consider defining a bean of type 'com.cxh.common.service.OrderService' in your configuration.怎么解决呢

    我们有时运行项目会出现Field orderService in com.cxh.consumer.web.OrderController required a bean of type 'com.c ...

  4. Consider defining a bean of type 'com.thw.db.service.IArticleService' in your configuration

    报错信息: 解决办法: 将AdminApplication文件移到com.thw文件夹下即可. 解决后:

  5. Consider defining a bean of type ‘cn.itcast.feign.clients.UserClient‘ in your configuration.解决方案

    Consider defining a bean of type 'cn.itcast.feign.clients.UserClient' in your configuration.解决方案 Fei ...

  6. Consider defining a bean of type ‘com.netflix.client.config.IClientConfig‘ in your configuration

    如果在微服务中用远程调用的时候,出现空指针异常,建议参考方法2. 在微服务项目中,启动一个springboot项目时,报错信息如下: Description:Parameter 0 of method ...

  7. SpringBoot启动报错Consider defining a bean of type ‘com.test.springmvc.dao.xx‘ in your configuration.

    报错信息如下: Description:Field userDao in com.test.springmvc.service.impl.UserServiceImpl required a bean ...

  8. SpringBoot:Consider defining a bean of type 'com.wzw.blog.mapper.UserMapper' in your configuration.

    今天使用SpringBoot整合Mybatis时遇到一个错误. *************************** APPLICATION FAILED TO START ************ ...

  9. SpringBoot Consider defining a bean of type 'com.xxx.xxx.dao.UserDao' in your configuration.

    SpringBoot 遇到的问题 遇到错误提示 required a bean of type 'com.xxx.xxx.dao.UserDao' that could not be found. 但 ...

  10. Consider defining a bean of type ‘com.luyao.guyue_demo.dao.UserDAO‘ in your configuration.

    出现如下报错的原因是,没有在方法入口GuyueDemoApplication添加@MapperScan(开启包扫描)注解,添加该注解即可.

最新文章

  1. C语言文件读写(5)-文件位置相关
  2. pandas 中的函数—— .reset_index()
  3. RabbitMQ默认端口记录(亲测)
  4. static关键字 void和void指针 函数指针
  5. 向前欧拉公式例题_小学语文阅读理解答题万能公式,简单实用!
  6. 二叉查找树的类模板实现
  7. python作品_专业解读 | 制作游戏、开发APP、 爬虫采集数据等背后,Python全栈专业背后还有更大的世界...
  8. BZOJ3678: wangxz与OJ
  9. bigdecimal 科学计数转普通计数_LoaRunner性能测试教程:Windows计数器(2)
  10. 转载:KOF97键盘连招
  11. 知识分享|日本面试常考问题+巧妙回答 ②
  12. 大学英语四级词汇记忆法
  13. 读写三维数据.stl文件
  14. (近5w字)面向小白のVue全家桶开发电商管理系统项目总结文档
  15. 全网征集对六如偈的理解:一切有为法,如梦幻泡影,如露亦如电,应作如是观
  16. qt tableb view 打印预览和打印的问题 个人解决办法
  17. 贴息政策打出“组合拳”,院校实验室建设攻略来了(二)!
  18. 《鲁棒控制——线性矩阵不等式处理方法》(俞立)第二、三、四章学习笔记
  19. 微信小程序学习记录(一)小实战——加法计算器
  20. 【问】软件安装,数据库失败,错误:(15007)‘HB’是无效登陆名或您没有相应的权限

热门文章

  1. ios 线条球_画线弹球球游戏下载|画线弹球球ios版下载v1.0.2-乐游网IOS频道
  2. oland显卡HDMI热插拔问题分析
  3. 苏大《实用计算机网络教程》复习题
  4. Flex 绘制圆形或椭圆并填充图片
  5. 麦吉尔大学计算机工程的世界排名,「麦吉尔大学」2021qs世界排名_申请条件 - 言顶留学...
  6. 特征分析 | MATLAB实现NCA(近邻成分分析)自定义损失函数
  7. 我认为还算经典的语录
  8. CDH环境HDFS权限问题
  9. leetcode 803.打砖块(C/C++/Java/python)
  10. 阿里巴巴江苏云计算数据中心项目在南通开工 项目一期计划2019年建成运营