当前位置:网站首页>Unsatisfied dependency expressed through field ‘baseMapper‘; nested exceptio
Unsatisfied dependency expressed through field ‘baseMapper‘; nested exceptio
2022-06-26 06:12:00 【Oh No 发量又少了】
这个报错主要是在我是用mybatis-plus的时候遇到的,出现这个报错的原因主要有以下两点:
- 导入的依赖的问题:
注意在使用spring boot整合mybatis-plus时导入的是如下依赖
<dependency>
<groupId>io.github.Caratacus</groupId>
<artifactId>mybatis-plus-boot-starter</artifactId>
<version>1.0.9</version>
而不是:
<dependency>-->
<groupId>com.suyeer</groupId>-->
<artifactId>mybatis-plus</artifactId>-->
<version>3.2.0.6</version>-->
</dependency>-->
- 注解问题
在mapper文件中的类中加入@Mapper注解
@Mapper
public interface UserMapper extends BaseMapper<Users> {
}
service接口实现类中加入@Service注解
@Service
public class UserServiceImpl extends ServiceImpl<UserMapper, Users> implements UserService {
}
边栏推荐
猜你喜欢

Message queuing - omnidirectional comparison

Transaction and message semantics

Comparison between Prometheus and ZABBIX

Tencent's 2022 school recruitment of large factories started with salary, and the general contracting of cabbage is close to 40W!

Implementation of third-party wechat authorized login for applet

Handwritten background management framework template (I)

Logstash——Logstash向Email发送告警邮件

Test depends on abstraction and does not depend on concrete

Hot! 11 popular open source Devops tools in 2021!

Import / export function implementation
随机推荐
架构设计方法
Message queuing - omnidirectional comparison
Five solutions across domains
跨域的五种解决方案
The purpose of writing programs is to solve problems
Keepalived to achieve high service availability
Logstash——使用throttle过滤器向钉钉发送预警消息
Redis underlying data structure
事务与消息语义
University Information Management System
[spark] how to implement spark SQL field blood relationship
Func < T, tresult > Commission - learning record
Gof23 - factory mode
打印数字的位信息
MobileNets: Efficient Convolutional Neural Networks for Mobile Vision Applications
Easy to understand from the IDE, and then talk about the applet IDE
numpy. random. choice
NPM private server problem of peanut shell intranet penetration mapping
SSH keygen specifies the path
Cython入门