当前位置: 首页 > news >正文

required a bean of type that could not be found. The injection point has the following annotations:

报错内容

Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2022-01-04 21:28:40.430 ERROR 28092 --- [  restartedMain] o.s.b.d.LoggingFailureAnalysisReporter   : 

***************************
APPLICATION FAILED TO START
***************************

Description:

Field userService in com.xxx.site.controller.UserController required a bean of type 'com.xxx.site.service.UserService' that could not be found.

The injection point has the following annotations:
	- @org.springframework.beans.factory.annotation.Autowired(required=true)


Action:

Consider defining a bean of type 'com.xxx.site.service.UserService' in your configuration.


Process finished with exit code 0

原因

原因是因为我在Service接口层上面加的@Service注解,所以报错,正确的做法是在ServiceImpl实现层加@Service注解。

相关文章:

  • 删除换行符在线 在线删除所有回车换行工具
  • 实现将HashMap转换成为ArrayList,并将map的Key 、Value分别存放到两个ArrayList当中
  • java switch可以字符串吗
  • @Query中countQuery的介绍
  • java8 Stream将List转成Map
  • ORDER BY clause is not in GROUP BY clause and contains nonaggregated column ‘xxx.sxxx_.id‘ which is
  • group by 和 where一起使用
  • java求多个Long的平均数,其中可能有null
  • java遍历Map的四种方法
  • win11窗口分1/3 2/3屏的方法
  • java后端实习经验
  • cb.conjunction()的意思
  • spring hashmap线程安全
  • 给el-table动态添加竖线分割
  • 使用hashMap优化两次for循环
  • [译] React v16.8: 含有Hooks的版本
  • 【EOS】Cleos基础
  • CODING 缺陷管理功能正式开始公测
  • Essential Studio for ASP.NET Web Forms 2017 v2,新增自定义树形网格工具栏
  • JDK 6和JDK 7中的substring()方法
  • Otto开发初探——微服务依赖管理新利器
  • react-core-image-upload 一款轻量级图片上传裁剪插件
  • select2 取值 遍历 设置默认值
  • thinkphp5.1 easywechat4 微信第三方开放平台
  • yii2中session跨域名的问题
  • 关于extract.autodesk.io的一些说明
  • 树莓派 - 使用须知
  • 数据结构java版之冒泡排序及优化
  • 数组的操作
  • 体验javascript之美-第五课 匿名函数自执行和闭包是一回事儿吗?
  • 微信公众号开发小记——5.python微信红包
  • 在GitHub多个账号上使用不同的SSH的配置方法
  • Hibernate主键生成策略及选择
  • 不要一棍子打翻所有黑盒模型,其实可以让它们发挥作用 ...
  • 通过调用文摘列表API获取文摘
  • 曜石科技宣布获得千万级天使轮投资,全方面布局电竞产业链 ...
  • ​草莓熊python turtle绘图代码(玫瑰花版)附源代码
  • (11)MATLAB PCA+SVM 人脸识别
  • (12)Hive调优——count distinct去重优化
  • (二)hibernate配置管理
  • (附源码)计算机毕业设计高校学生选课系统
  • (三分钟)速览传统边缘检测算子
  • (未解决)jmeter报错之“请在微信客户端打开链接”
  • (详细版)Vary: Scaling up the Vision Vocabulary for Large Vision-Language Models
  • (转)chrome浏览器收藏夹(书签)的导出与导入
  • (转载)在C#用WM_COPYDATA消息来实现两个进程之间传递数据
  • .NET “底层”异步编程模式——异步编程模型(Asynchronous Programming Model,APM)...
  • .NET 的程序集加载上下文
  • .net 托管代码与非托管代码
  • .NET框架
  • :“Failed to access IIS metabase”解决方法
  • [ C++ ] STL---string类的使用指南
  • [20161101]rman备份与数据文件变化7.txt
  • [C#7] 1.Tuples(元组)
  • [CISCN2019 华北赛区 Day1 Web2]ikun