@Service Spring required a bean could not be found.

Description:

Field inservice in controller

required a bean of type Inservice 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 Inservice in your configuration.

Service的實現類上沒有標準@Service,導致Spring不能加載Bean。

复制代码
public interface InService {

}


public class InvoiceImpl implements InService {

}


@Service
@Transactional
public class InvoiceImpl implements InService {

}
相关推荐
zc.z3 小时前
JAVA实现:纯PCM格式音频转换成BASE64
java·音视频·pcm
mask哥3 小时前
力扣算法java实现汇总整理(上)
java·算法·leetcode
无风听海4 小时前
深入剖析 YARP 的 Transforms:构建灵活的反向代理转换管道
后端·中间件·asp.net
Gopher_HBo4 小时前
负载均衡
后端
自由生长20244 小时前
RAG已死?什么标题党啊!
后端
Aaswk5 小时前
Java Lambda 表达式与流处理
java·开发语言·python
是宇写的啊5 小时前
Spring AOP
java·spring
万邦科技Lafite5 小时前
京东item_get接口实战案例:实时商品价格监控全流程解析
java·开发语言·数据库·python·开放api·淘宝开放平台
东方小月5 小时前
5分钟搞懂Harness Engineering(驾驭工程):从提示词到AI Agent的进化之路
前端·后端·架构
Mr_pyx6 小时前
Spring AI 入门教程:Java开发者的AI应用捷径
java·人工智能·spring