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

}
相关推荐
程序员老邢1 分钟前
【产品底稿 08】商助慧 AI 仿写实战复盘:RAG 知识库 + 大模型联动,一键生成技术底稿
人工智能·spring boot·后端·ai·语言模型·milvus
IT_陈寒2 分钟前
JavaScript的闭包差点让我加班到凌晨
前端·人工智能·后端
今天又在写代码3 分钟前
Docker部署
java·阿里云·docker
_Evan_Yao4 分钟前
技术成长周记07|复盘中看清方向,多Agent开启新挑战
java·后端
人道领域5 分钟前
【黑马点评日记】Redis分布式锁终极方案:Redisson全面解析(含源码解析)
java·数据库·redis·分布式·缓存
Achou.Wang7 分钟前
go语言并发编程
java·开发语言·golang
小王师傅669 分钟前
【Java结构化梳理】泛型-初步了解-中
java·开发语言
CQU_JIAKE9 分钟前
[q]4.25
java·开发语言·前端
YaBingSec12 分钟前
玄机网络安全靶场:GeoServer XXE 任意文件读取(CVE-2025-58360)
java·运维·网络·安全·web安全·tomcat·ssh
shehuiyuelaiyuehao16 分钟前
算法12,滑动窗口,将x减到0的最小操作数
java·数据结构·算法