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

}
相关推荐
paopaokaka_luck4 分钟前
智能推荐社交分享小程序(websocket即时通讯、协同过滤算法、时间衰减因子模型、热度得分算法)
数据库·vue.js·spring boot·后端·websocket·小程序
留不住丨晚霞12 分钟前
说说SpringBoot常用的注解?
java·开发语言
华科云商xiao徐18 分钟前
Java多线程爬虫动态线程管理实现
java·爬虫·数据挖掘
程序员NEO20 分钟前
Spring AI 对话记忆大揭秘:服务器重启,聊天记录不再丢失!
人工智能·后端
用户214118326360220 分钟前
惊爆!国内轻松白嫖 Claude Code,编程效率狂飙
后端
iccb101325 分钟前
我是如何实现在线客服系统的极致稳定性与安全性的
前端·javascript·后端
柒七爱吃麻辣烫27 分钟前
八股文系列-----SpringBoot自动配置的流程
java·spring boot·rpc
M1A132 分钟前
Java 面试系列第一弹:基础问题大盘点
java·后端·mysql
发仔12332 分钟前
Dubbo介绍及示例用法
java·dubbo
goxingman40 分钟前
关于使用idea打包的时候报错,Maven提示乱码java: �Ҳ�������
java·maven·intellij-idea