zoukankan      html  css  js  c++  java
  • Mybaits 生产mapper

    1、maven中添加插件

      

     <build>
            <plugins>
                <plugin>
                    <groupId>org.springframework.boot</groupId>
                    <artifactId>spring-boot-maven-plugin</artifactId>
                </plugin>
                <plugin>
                    <groupId>org.springframework.boot</groupId>
                    <artifactId>spring-boot-maven-plugin</artifactId>
                </plugin>
                <plugin>
                    <groupId>org.mybatis.generator</groupId>
                    <artifactId>mybatis-generator-maven-plugin</artifactId>
                    <version>1.3.7</version>
                    <dependencies>
                            <dependency> <groupId>tk.mybatis</groupId>
                                <artifactId>mapper</artifactId>
                                <version>4.0.3</version>
                            </dependency>
    
                        <dependency>
                            <groupId> mysql</groupId>
                            <artifactId> mysql-connector-java</artifactId>
                            <version>8.0.16</version>
                        </dependency>
                        <dependency>
                            <groupId>org.mybatis.generator</groupId>
                            <artifactId>mybatis-generator-core</artifactId>
                            <version>1.3.7</version>
                        </dependency>
                        <dependency>
                            <groupId>javax.servlet</groupId>
                            <artifactId>javax.servlet-api</artifactId>
                            <version>3.1.0</version>
                            <scope>provided</scope>
                        </dependency>
                    </dependencies>
                    <executions>
                        <execution>
                            <id>Generate MyBatis Artifacts</id>
                            <phase>package</phase>
                            <goals>
                                <goal>generate</goal>
                            </goals>
                        </execution>
                    </executions>
                    <configuration>
                        <!--允许移动生成的文件 -->
                        <verbose>true</verbose>
                        <!-- 是否覆盖 -->
                        <overwrite>false</overwrite>
                        <!-- 自动生成的配置 -->
                        <configurationFile>src/main/resources/mybatis-generater.xml</configurationFile>
                    </configuration>
                </plugin>
    
            </plugins>
        </build>
    

      2、配置 mybatis-generater.xml

  • 相关阅读:
    python学习手册 (第3版)
    服务器搭建
    阿里云 大数据 云计算 分布式
    PS插件开发plugin
    GIS九交模型
    人脸识别 人工智能(AI)
    Github上发布托管和下载
    RPLiDAR 激光雷达探测地面高程
    linux内核调试
    convex hull
  • 原文地址:https://www.cnblogs.com/irobotzz/p/12855689.html
Copyright © 2011-2022 走看看