SpringBoot集成Mybatis

1.新建一个Springboot项目。

2.添加依赖

 mysql驱动 和mybatis 起步依赖

        <dependency>
            <groupId>mysql</groupId>
            <artifactId>mysql-connector-java</artifactId>
        </dependency>
        <dependency>
            <groupId>org.mybatis.spring.boot</groupId>
            <artifactId>mybatis-spring-boot-starter</artifactId>
            <version>2.0.0</version>
        </dependency>

 3.利用Mybatis提供的逆向工程生成实体Bean 映射文件 DAO接口

posted @ 2022-04-23 21:09  羽毛球打的贼好  阅读(25)  评论(0)    收藏  举报