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

2、百度了一下,说是运行spring boot的Application类没有跟相关的service层放在同个包或者在其父包底下,找不到这个service,后面发现确实有这个问题,于是把Application类放在com.xg.stupro底下,发现还是不行。

3、最后发现原来忘记加了在Service类底下忘记加了@Service注解,加了便可以了。

4、又是细节决定成败。。。

Consider defining a bean of type ‘com.xg.stupro.service.StudentService‘ in your configuration.相关推荐

  1. 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 ...

  2. 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 ...

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

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

  4. 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 ...

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

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

  6. 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 ...

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

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

  8. 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. 但 ...

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

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

最新文章

  1. 数据库将某个字段由可为空改为非空
  2. c# 文件及目录操作类
  3. Spring3.0 AOP 详解
  4. docker-compose报错:(root) Additional property mail-service is not allowed
  5. java利用poi读取excel_java利用POI 读取EXCEL
  6. 牛客多校10 - Tournament(找规律)
  7. Java Web App体系结构
  8. 5张图看懂如何实现Windows RTMP实时导播功能
  9. async 与 await 的用法详解
  10. 基于PostgreSQL流复制的容灾库架构设想及实现
  11. 《C++标准库》笔记--STL 2
  12. 渗透测试-地基篇-Cobal Strike-taowu梼杌详细介绍(十九)
  13. raspberry pi 4检查ch340/ch341驱动
  14. OA会议 04 (查询会议签字)
  15. 作为一枚程序员,每天必用的软件有哪些?
  16. 扫码点餐小程序项目后端开发之“01.搭建服务器基础设施”
  17. 5.Transformation(转换算子)
  18. 华为桌面小程序在哪里_微信Windows版更新至3.0:批量管理联系人,小程序可添加至桌面...
  19. 中联医疗系统服务器,中联医学影像系统(PACS)
  20. Excel库存表通过吉度PDA盘点机形成盘点差异表

热门文章

  1. spring AOP注解实现
  2. java获取iPhone手机图片旋转角度处理
  3. 为PHP代码在线加密
  4. 在 Windows 8 中支持传感器
  5. Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.
  6. scrollspy 滚动监听插件
  7. jQuery源码研究分析学习笔记-jQuery.buildFragment()(六)
  8. JNI开发笔记(七)--aar库的生成和调用
  9. C语言中如何将小数或整数和字符串合二为一
  10. html表格td的内容修改,点击table中的td,修改td中的内容功能实现