SpringBoot集成MybatisPlus

1、添加依赖

<!-- mybatis-plus启动器-->
    <dependency>
        <groupId>com.baomidou</groupId>
        <artifactId>mybatis-plus-boot-starter</artifactId>
    </dependency>
    <!-- mybatis-plus代码生成器-->
    <dependency>
        <groupId>com.baomidou</groupId>
        <artifactId>mybatis-plus-generator</artifactId>
    </dependency>
    <!-- Mysql驱动包 -->
    <dependency>
        <groupId>mysql</groupId>
        <artifactId>mysql-connector-java</artifactId>
        <!-- 只在运行时使用,如JDBC驱动,适用运行和测试阶段。-->
        <scope>runtime</scope>
    </dependency>
    <!--velocity代码生成使用模板,不加该依赖会报错 -->
    <dependency>
        <groupId>org.apache.velocity</groupId>
        <artifactId>velocity-engine-core</artifactId>
    </dependency>

2、MybatisPlusConfig

3、FieldMetaObjectHandler

4、MybatisPlusSqlInjector

5、CodeGeneratorUtil

6、EnableCustomConfig

posted @ 2024-01-21 15:12  右手一个柚  阅读(48)  评论(0编辑  收藏  举报