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

}
相关推荐
CV_J3 小时前
安装kibana
java·elasticsearch·spring cloud·docker·容器
码农水水5 小时前
国家电网Java面试被问:TCP的BBR拥塞控制算法原理
java·开发语言·网络·分布式·面试·wpf
浮尘笔记5 小时前
Go语言临时对象池:sync.Pool的原理与使用
开发语言·后端·golang
qq_336313935 小时前
java基础-网络编程-TCP
java·网络·tcp/ip
咕噜咕噜啦啦5 小时前
Java期末习题速通
java·开发语言
盐真卿6 小时前
python2
java·前端·javascript
梦梦代码精6 小时前
BuildingAI vs Dify vs 扣子:三大开源智能体平台架构风格对比
开发语言·前端·数据库·后端·架构·开源·推荐算法
一嘴一个橘子7 小时前
mybatis - 动态语句、批量注册mapper、分页插件
java
组合缺一7 小时前
Json Dom 怎么玩转?
java·json·dom·snack4
REDcker7 小时前
RESTful API设计规范详解
服务器·后端·接口·api·restful·博客·后端开发