Field XXXX required a bean of type XXXX that could not be found.

本文探讨了在Spring Boot项目中,由于Mapper接口未添加@Mapper注解导致的bean未找到异常。通过在Mapper接口上添加@Mapper注解,可以解决此问题,确保应用程序正常启动。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

 出现下列异常 是因为 mapper接口中没有添加注解    @Mapper   【出现这样得异常一般是注解得问题   请检查业务层和mapper层得注解是否完善


 
***************************
APPLICATION FAILED TO START
***************************

Description:

Field identifyapplyMapper in com.bfc.boperation.service.serviceImpl.IdentifyApplyServiceImpl required a bean of type 'com.bfc.boperation.mapper.IdentifyapplyMapper' 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 'com.bfc.boperation.mapper.IdentifyapplyMapper' in your configuration.


Process finished with exit code 0

 在Mapper接口中加上@Mapper注解

@Mapper
public interface IdentifyapplyMapper {
    int deleteByPrimaryKey(Long applyId);
}

 

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值