【从零开始学Mybatis笔记(一)】Mybatis常用资源分享

jar包模式

链接:https://pan.baidu.com/s/1vwZB4dTh0LHQ7XKlTWaABA
提取码:meb3
复制这段内容后打开百度网盘手机App,操作更方便哦

由于Maven的强大,jar包的依赖导入方法已经很少出现了。但是学校等注重基础的教育方式,还会涉及到底层。大家也不用排斥,如果可以学会更为繁琐,复杂的底层操作,再配合优秀、高效的开发工具,那必然是如鱼得水,扶摇直上。

springboot + maven 模式

如果使用springboot和maven,直接导入依赖即可,同时别忘了,还有连接数据库的驱动。

       <!-- https://mvnrepository.com/artifact/org.mybatis.spring.boot/mybatis-spring-boot-starter -->
        <dependency>
            <groupId>org.mybatis.spring.boot</groupId>
            <artifactId>mybatis-spring-boot-starter</artifactId>
            <version>2.1.3</version>
        </dependency>
        <!-- https://mvnrepository.com/artifact/mysql/mysql-connector-java -->
        <dependency>
            <groupId>mysql</groupId>
            <artifactId>mysql-connector-java</artifactId>
            <version>5.1.47</version>
        </dependency>

mysql一般使用的5.x的版本,mysql8.0以上需要8.0以上的驱动,在maven查找即可。

mybatis-plus

你还可以直接导入Mybatis-plus,依赖如下:

<!--        mybatis-plus启动器-->
        <dependency>
            <groupId>com.baomidou</groupId>
            <artifactId>mybatis-plus-boot-starter</artifactId>
            <version>3.1.0</version>
        </dependency>

最后附上Mybatis和Mybatis-plus的github地址
https://github.com/mybatis/mybatis-3
https://github.com/baomidou/mybatis-plus

posted @ 2020-04-28 11:42  朱李洛克  阅读(224)  评论(0编辑  收藏  举报
// 侧边栏目录 // https://blog-static.cnblogs.com/files/douzujun/marvin.nav.my1502.css