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

}
相关推荐
iOS开发上架哦11 小时前
APP应用上架完整指南:从准备资料到上架流程详解
后端
许商11 小时前
【stm32】【printf】
java·前端·stm32
JIngJaneIL11 小时前
智慧物业|物业管理|基于SprinBoot+vue的智慧物业管理系统(源码+数据库+文档)
java·前端·数据库·vue.js·spring boot·论文·智慧物业管理系统
ANYOLY11 小时前
Redis 面试题库
java·redis·面试
凌览11 小时前
一键去水印|5 款免费小红书解析工具推荐
前端·javascript·后端
枫叶梨花11 小时前
一次 Kettle 中文乱码写入失败的完整排查实录
数据库·后端
expect7g11 小时前
Paimon源码解读 -- PartialUpdateMerge
大数据·后端·flink
懒惰蜗牛11 小时前
Day63 | Java IO之NIO三件套--选择器(下)
java·nio·选择器·selector·半包粘包·tcp缓冲区
申阳11 小时前
Day 16:02. 基于 Tauri 2.0 开发后台管理系统-项目初始化配置
前端·后端·程序员
bcbnb11 小时前
游戏上架 App Store 的完整发行流程,从构建、合规到审核的多角色协同指南
后端