@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 {

}
相关推荐
daidaidaiyu3 小时前
JMS, ActiveMQ 学习一则
java
weixin_704266053 小时前
SpringBoot全注解开发指南
java·spring boot·mybatis
星如雨グッ!(๑•̀ㅂ•́)و✧3 小时前
Webflux fromXXX对比
java
competes4 小时前
学生需求 交易累计积分,积分兑换奖品
java·大数据·开发语言·人工智能·java-ee
小羊子说4 小时前
Android系统中 socketpair 的源码解读与应用分析小结
android·java
splage4 小时前
Java进阶——IO 流
java·开发语言·python
想打游戏的程序猿5 小时前
核心概念层——深入理解 Agent 是什么
后端·ai编程
always_TT5 小时前
从Python_Java转学C语言需要注意什么?
java·c语言·python
一招定胜负5 小时前
课堂教学质量综合评分系统
java·linux·前端
Hui Baby5 小时前
spring优雅释放资源
java·spring