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

}
相关推荐
爱勇宝3 分钟前
《道德经》第4章,老子写得很像在描述一个“底层系统”。
前端·后端·程序员
神奇小汤圆29 分钟前
Redis 哨兵搭建+ACL权限控制
后端
snow@li1 小时前
Java:Java 服务器(Web 容器 / Servlet 容器)完整工作清单
java·服务器·前端
青山木1 小时前
Hot 100 --- 二叉树与递归
java·数据结构·算法·leetcode·深度优先
大型UFO1 小时前
在 Hermes Agent 里搭建全中文 Honcho 记忆系统踩过的坑
后端
jason成都2 小时前
GNSS-QC 数据清洗功能全面增强|滑坡监测实测验证,适配 rtklib_java 高精度解算链路
java·gnss
前端工作日常2 小时前
我学习到的Java概念
java·后端
卓怡学长2 小时前
w263基于springboot + vue 健康饮食管理系统
java·数据库·vue.js·spring boot·spring·intellij-idea
r_oo_ki_e_2 小时前
Java反射机制学习笔记
java·笔记·学习
九皇叔叔2 小时前
RHEL9.8 配置本地镜像仓库
android·java·缓存