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

}
相关推荐
码事漫谈40 分钟前
Reactor网络模型深度解析:从并发困境说起
后端
T***u33342 分钟前
Rust在Web中的 Web框架
开发语言·后端·rust
码事漫谈43 分钟前
从理论到实践:构建你的AI语音桌面助手(Demo演示)
后端
杰克尼1 小时前
3. 分巧克力
java·数据结构·算法
听风吟丶1 小时前
Java 高级多线程编程:从虚拟线程到结构化并发的实战演进
java·开发语言
o***59271 小时前
Spring 过滤器:OncePerRequestFilter 应用详解
java·后端·spring
稚辉君.MCA_P8_Java1 小时前
Gemini永久会员 三个线程(A、B、C)交替执行
java·后端·架构
lijiatu100861 小时前
C++ 类成员变量声明语法错误
java·开发语言·c++
汝生淮南吾在北1 小时前
SpringBoot+Vue超市收银管理系统
vue.js·spring boot·后端
p***93031 小时前
SpringBoot + vue 管理系统
vue.js·spring boot·后端