出现下列异常 是因为 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);
}

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

被折叠的 条评论
为什么被折叠?



