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

}
相关推荐
plainGeekDev18 分钟前
Activity 间传值 → Navigation 参数
android·java·kotlin
plainGeekDev22 分钟前
onActivityResult → ActivityResult API
android·java·kotlin
Sunia23 分钟前
《AgentX 专栏》10-生产部署:3台2C4G云服务器把企业级Agent真正跑起来的完整方案
java·架构
江华森25 分钟前
Django 6.0 从入门到实战教程(上机实操版)
后端
ZhengEnCi1 小时前
J7A-高级Java工程师面试三道灵魂拷问-深度广度与工程素养的终极检验
java·后端
爱勇宝3 小时前
小红花成长新版:模板来了,鼓励也更容易开始
前端·后端·程序员
用户47949283569153 小时前
翻完 lark-cli 的 17 万行 Go 代码,我学到了什么
后端·openai
卷无止境4 小时前
Eigen 库如何借助 OpenMP 加速计算
c++·后端
羑悻4 小时前
别再只接个 API 了!我用 EdgeOne Makers 手搓了一个“懂业务”的官网售前 AI
后端
卷无止境4 小时前
OpenMPI、MPICH 与 OpenMP:关系、核心概念与架构全解
c++·后端