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

}
相关推荐
於時光清歌9 分钟前
Git基础使用
后端
明月_清风26 分钟前
Python 性能微观世界:列表推导式 vs for 循环
后端·python
风象南26 分钟前
纯文本模型竟然也能直接“画图”,而且还很好用
前端·人工智能·后端
明月_清风29 分钟前
Python 性能翻身仗:从 O(n) 到 O(1) 的工程实践
后端·python
IT_陈寒44 分钟前
Vite vs Webpack:5个让你的开发效率翻倍的实战对比
前端·人工智能·后端
JaguarJack1 小时前
FrankenPHP 原生支持 Windows 了
后端·php·服务端
BingoGo2 小时前
FrankenPHP 原生支持 Windows 了
后端·php
Moment14 小时前
Vibe Coding 时代,到底该选什么样的工具来提升效率❓❓❓
前端·后端·github
Victor35614 小时前
MongoDB(27)什么是文本索引?
后端
可夫小子15 小时前
OpenClaw基础-3-telegram机器人配置与加入群聊
后端