整合 idea + SpringBoot + MybatisPlus

本文介绍了如何在IDEA 2020.3环境下,使用SpringBoot 2.4.1和MybatisPlus 3.4.1进行整合,包括更换Maven仓库、配置pom和yaml文件、创建数据库表、定义JavaBean和Mapper,最后进行了测试。
摘要由CSDN通过智能技术生成

整合 idea + SpringBoot + MybatisPlus

环境 idea 2020.3 + SpringBoot 2.4.1 + MybatisPlus 3.4.1 + MySQL 5.6

  • 【第一步】新建一个 SpringBoot 工程。
  • 【第二步】将 Maven 更换为阿里云仓库。
<!-- 修改 maven 根目录下的 conf 文件夹中的 setting.xml 文件 -->
<mirrors>
    <mirror>
      <id>alimaven</id>
      <name>aliyun maven</name>
      <url>http://maven.aliyun.com/nexus/content/groups/public/</url>
      <mirrorOf>central</mirrorOf>        
    </mirror>
</mirrors>

<!-- 配置pom.xml 文件 -->
<repositories>  
        <repository>  
            <id>alimaven</id>  
            <name>aliyun maven</name>  
            <url>http://maven.aliyun.com/nexus/content/groups/public/</url>  
            <releases>  
                <enabled>true</enabled>  
            </releases>  
            <snapshots>  
                <enabled>false</enabled>  
            </snapshots>  
        </repository>  
</repositories>
  • 【第三步】pom 文件导入依赖
<!-- MybatisPlus 依赖 -->
<dependency
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值