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

}
相关推荐
vipxieliang10 分钟前
PHP 密码哈希与 password_hash 最佳实践
后端·php
量化分析码农25 分钟前
【Python量化波动率实战 03】波动大就少拿点:波动率目标仓位的回测实证
后端
Rainmicro34 分钟前
【无标题】
java·数据库·算法
驭渊的小故事43 分钟前
Spring AOP 入门:从 AOP 概念到第一个耗时统计切面
java·后端·spring
系统集成-鹰翔1 小时前
ERP单据已作废为什么商品仍不能删除,引用检查与软删除怎么查
javascript·经验分享·后端
天天被压力1 小时前
【A股分钟级高频数据完全手册 #09】A股历史分时交易数据接口:普通分时怎么批量下
java·人工智能·python
Moment1 小时前
Harness Engineering 为什么是 AI Coding 的工程底座 ❓❓❓
前端·后端·面试
天天被压力1 小时前
【A股分钟级高频数据完全手册 #10】股票实时行情数据接口Python:公开源实时交易取数
java·人工智能·python
apcipot_rain1 小时前
C++转Java日记(05)
java·开发语言·c++