1、引入maven
<!-- mysql -->
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>${mysql.version}</version>
</dependency>
<!-- 阿里数据库连接池 -->
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>druid-spring-boot-starter</artifactId>
<version>${druid.version}</version>
</dependency>
<!-- mybatis-plus -->
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-boot-starter</artifactId>
<version>${mybatis-plus.boot.version}</version>
</dependency>
2、mapper继承
BaseMapper<实体类名>
3、service和serviceImpl继承
IService<实体类名>
ServiceImpl<mapper名,实体类名>
4、导入完成就可以直接调用了
mybatis-plus调用接口:
太多了就单独放一篇博客上了:
标签:java,boot,version,plus,mysql,mybatis From: https://www.cnblogs.com/h-w-b/p/16962306.html