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

}
相关推荐
唐青枫37 分钟前
看懂内存地址之后,才算真正入门 Zig:指针、切片与实战
后端
朋克洛德的码农37 分钟前
Go并发-sync包四剑客:Mutex、RWMutex、WaitGroup、Once-从入门到原理
开发语言·后端·golang
fulton39 分钟前
为什么不用现成的开源工具?NovelOps与6大AI写作工具横向对比
后端
fulton42 分钟前
3个月踩坑实录:从想法到270章规划,AI写长篇到底要花多少成本?
后端
fulton43 分钟前
为什么AI写到20章就开始"复制粘贴"自己?创意扰动机制详解
后端
艺艺生辉44 分钟前
从if-else到策略模式
后端·设计模式
fulton44 分钟前
AI写小说失败的第一原因是什么
后端
fulton1 小时前
这段文字有AI味"到底怎么判断
后端
fulton1 小时前
为什么AI写的小说节奏总是崩
后端
fulton1 小时前
为什么AI写到30章角色就崩人设
后端