使用mybatis-plus-generator进行代码自动生成的方法

为了解放程序员的双手,减少重复性代码的编写,推荐使用插件:mybatis-plus-generator 进行代码自动生成。下面我将详细介绍通过mybatis-plus-generator 插件自动生成 controller、service、mapper、serviceImpl相关代码。

项目工程目录总览如下:

1. 使用 idea 创建 maven 项目,引入相关依赖,项目pom文件如下所示:

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>

  <groupId>com.miaoying.generator</groupId>
  <artifactId>generator-demo</artifactId>
  <version>1.0-SNAPSHOT</version>

  <properties>
    <mybatis-plus.version>3.0.1</mybatis-plus.version>
    <mysql.connector.java.version>8.0.19</mysql.connector.java.version>
    <springfox-swagger.version>2.9.2</springfox-swagger.version>
  </properties>

  <dependencies>
    <!-- mybatisPlus 核心库 -->
    <dependency>
      <groupId>com.baomidou</groupId>
      <artifactId>mybatis-plus-boot-starter</artifactId>
      <version>${mybatis-plus.version}</version>
    </dependency>
    <dependency>
      <groupId>com.baomidou</groupId>
      <artifactId>mybatis-plus-generator</artifactId>
      <version>${mybatis-plus.version}</version>
    </dependency>
    <!-- 提供mysql驱动 -->
    <dependency>
      <groupId>mysql</groupId>
      <artifactId>mysql-connector-java</artifactId>
      <version>${mysql.connector.java.version}</version>
    </dependency>
    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-web</artifactId>
      <version>RELEASE</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-web</artifactId>
      <version>RELEASE</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>io.springfox</groupId>
      <artifactId>springfox-swagger-ui</artifactId>
      <version>${springfox-swagger.version}</version>
    </dependency>
    <dependency>
      <groupId>io.springfox</groupId>
      <artifactId>springfox-swagger2</artifactId>
      <version>${springfox-swagger.version}</version>
    </dependency>
  </dependencies>
</project>

2. 在资源文件夹里新增6个文件:

2.1. controller.java.vm

package ${package.Controller};

import org.springframework.web.bind.annotation.RequestMapping;

#if(${restControllerStyle})
import org.springframework.web.bind.annotation.RestController;
#else
import org.springframework.stereotype.Controller;
#end
#if(${superControllerClassPackage})
import ${superControllerClassPackage};
#end

/**
 * @auther ${author}
 * @create ${cfg.dateTime}
 * @describe $!{table.comment}前端控制器
 */
#if(${restControllerStyle})
@RestController
#else
@Controller
#end
@RequestMapping("#if(${package.ModuleName})/${package.ModuleName}#end/#if(${controllerMappingHyphenStyle})${controllerMappingHyphen}#else${table.entityPath}#end")
#if(${kotlin})
class ${table.controllerName}#if(${superControllerClass}) : ${superControllerClass}()#end

#else
#if(${superControllerClass})
public class ${table.controllerName} extends ${superControllerClass} {
#else
public class ${table.controllerName} {
#end

}
#end

2.2. entity.java.vm

package ${package.Entity};

#foreach($pkg in ${table.importPackages})
import ${pkg};
#end
import com.baomidou.mybatisplus.annotation.*;
#if(${swagger2})
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import com.fasterxml.jackson.annotation.JsonInclude;
#end
#if(${entityLombokModel})
import lombok.Data;
#end

/**
 * @auther ${author}
 * @create ${cfg.dateTime}
 * @describe $!{table.comment}实体类
 */
#if(${entityLombokModel})
@Data
#end
@TableName("${table.name}")
#if(${swagger2})
@JsonInclude(JsonInclude.Include.NON_NULL)
@ApiModel(value="${entity}对象", description="$!{table.comment}")
#end
#if(${superEntityClass})
public class ${entity} extends ${superEntityClass}#if(${activeRecord})<${entity}>#end {
#elseif(${activeRecord})
public class ${entity} extends Model<${entity}> {
#else
public class ${entity} implements Serializable {
#end

  private static final long serialVersionUID = 1L;
## ---------- BEGIN 字段循环遍历 ----------
#foreach($field in ${table.fields})

#if(${field.keyFlag})
#set($keyPropertyName=${field.propertyName})
#end
#if("$!field.comment" != "")
  #if(${swagger2})
  @ApiModelProperty(value = "${field.comment}")
  #else
  /**
   * ${field.comment}
   */
   #end
#end
#if(${field.keyFlag})
## 主键
#if(${field.keyIdentityFlag})
  @TableId(value = "${field.name}", type = IdType.AUTO)
#elseif(!$null.isNull(${idType}) && "$!idType" != "")
  @TableId(value = "${field.name}", type = IdType.${idType})
#elseif(${field.convert})
  @TableId("${field.name}")
#end
## 普通字段
#elseif(${field.fill})
## -----  存在字段填充设置  -----
#if(${field.convert})
  @TableField(value = "${field.name}", fill = FieldFill.${field.fill})
#else
  @TableField(fill = FieldFill.${field.fill})
#end
#else
  @TableField("${field.name}")
#end
## 乐观锁注解
#if(${versionFieldName}==${field.name})
  @Version
#end
## 逻辑删除注解
#if(${logicDeleteFieldName}==${field.name})
  @TableLogic
#end
  private ${field.propertyType} ${field.propertyName};
#end
## ---------- END 字段循环遍历 ----------

#if(!${entityLombokModel})
#foreach($field in ${table.fields})
#if(${field.propertyType.equals("boolean")})
#set($getprefix="is")
#else
#set($getprefix="get")
#end

  public ${field.propertyType} ${getprefix}${field.capitalName}() {
    return ${field.propertyName};
  }

#if(${entityBuilderModel})
  public ${entity} set${field.capitalName}(${field.propertyType} ${field.propertyName}) {
#else
  public void set${field.capitalName}(${field.propertyType} ${field.propertyName}) {
#end
    this.${field.propertyName} = ${field.propertyName};
#if(${entityBuilderModel})
    return this;
#end
  }
#end
#end

#if(${entityColumnConstant})
#foreach($field in ${table.fields})
  public static final String ${field.name.toUpperCase()} = "${field.name}";

#end
#end
#if(${activeRecord})
  @Override
  protected Serializable pkVal() {
#if(${keyPropertyName})
    return this.${keyPropertyName};
#else
    return null;
#end
  }

#end
#if(!${entityLombokModel})
  @Override
  public String toString() {
    return "${entity}{" +
#foreach($field in ${table.fields})
#if($!{foreach.index}==0)
    "${field.propertyName}=" + ${field.propertyName} +
#else
    ", ${field.propertyName}=" + ${field.propertyName} +
#end
#end
    "}";
  }
#end
}

2.3. mapper.java.vm

package ${package.Mapper};

import ${package.Entity}.${entity};
import ${superMapperClassPackage};

/**
 * @auther ${author}
 * @create ${cfg.dateTime}
 * @describe $!{table.comment}mapper类
 */
#if(${kotlin})
interface ${table.mapperName} : ${superMapperClass}<${entity}>
#else
public interface ${table.mapperName} extends ${superMapperClass}<${entity}> {

}
#end

2.4. mapper.xml.vm

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="${package.Mapper}.${table.mapperName}">

#if(${enableCache})
  <!-- 开启二级缓存 -->
  <cache type="org.mybatis.caches.ehcache.LoggingEhcache"/>

#end
#if(${baseResultMap})
  <!-- 通用查询映射结果 -->
  <resultMap id="BaseResultMap" type="${package.Entity}.${entity}">
#foreach($field in ${table.fields})
#if(${field.keyFlag})##生成主键排在第一位
    <id column="${field.name}" property="${field.propertyName}" />
#end
#end
#foreach($field in ${table.commonFields})##生成公共字段
  <result column="${field.name}" property="${field.propertyName}" />
#end
#foreach($field in ${table.fields})
#if(!${field.keyFlag})##生成普通字段
    <result column="${field.name}" property="${field.propertyName}" />
#end
#end
  </resultMap>

#end
#if(${baseColumnList})
  <!-- 通用查询结果列 -->
  <sql id="Base_Column_List">
#foreach($field in ${table.commonFields})
    ${field.name},
#end
    ${table.fieldNames}
  </sql>

#end
</mapper>

2.5. service.java.vm

package ${package.Service};

import ${package.Entity}.${entity};
import ${superServiceClassPackage};

/**
 * @auther ${author}
 * @create ${cfg.dateTime}
 * @describe $!{table.comment}服务类
 */
#if(${kotlin})
interface ${table.serviceName} : ${superServiceClass}<${entity}>
#else
public interface ${table.serviceName} extends ${superServiceClass}<${entity}> {

}
#end

2.6. serviceImpl.java.vm

package ${package.ServiceImpl};

import ${package.Entity}.${entity};
import ${package.Mapper}.${table.mapperName};
import ${package.Service}.${table.serviceName};
import ${superServiceImplClassPackage};
import org.springframework.stereotype.Service;

/**
 * @auther ${author}
 * @create ${cfg.dateTime}
 * @describe $!{table.comment}服务实现类
 */
@Service
#if(${kotlin})
open class ${table.serviceImplName} : ${superServiceImplClass}<${table.mapperName}, ${entity}>(), ${table.serviceName} {

}
#else
public class ${table.serviceImplName} extends ${superServiceImplClass}<${table.mapperName}, ${entity}> implements ${table.serviceName} {

}
#end

3. 核心类 CodeGenerator.java 内容如下:

package com.miaoying.generator.start;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.core.exceptions.MybatisPlusException;
import com.baomidou.mybatisplus.core.toolkit.StringPool;
import com.baomidou.mybatisplus.core.toolkit.StringUtils;
import com.baomidou.mybatisplus.generator.AutoGenerator;
import com.baomidou.mybatisplus.generator.InjectionConfig;
import com.baomidou.mybatisplus.generator.config.*;
import com.baomidou.mybatisplus.generator.config.po.TableInfo;
import com.baomidou.mybatisplus.generator.config.rules.DateType;
import com.baomidou.mybatisplus.generator.config.rules.NamingStrategy;
import com.sun.javafx.PlatformUtil;

import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.util.*;

public class CodeGenerator {
  /**
   * 代码生成位置
   */
  public static final String PARENT_NAME = "com.miaoying.generator.modulardb";

  /**
   * modular 名字
   */
  public static final String MODULAR_NAME = "";

  /**
   * 基本路径
   */
  public static final String SRC_MAIN_JAVA = "src/main/java/";

  /**
   * 作者
   */
  public static final String AUTHOR = "CodeGenerator";

  /**
   * 是否是 rest 接口
   */
  private static final boolean REST_CONTROLLER_STYLE = true;

  public static final String JDBC_MYSQL_URL = "jdbc:mysql://localhost:3306/garbagesort?" +
      "serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf8";

  public static final String JDBC_DRIVER_NAME = "com.mysql.cj.jdbc.Driver";

  public static final String JDBC_USERNAME = "root";

  public static final String JDBC_PASSWORD = "123456";

  public static void main(String[] args) {
    String moduleName = scanner("模块名");
    String tableName = scanner("表名");
    String tablePrefix = scanner("表前缀(无前缀输入#)").replaceAll("#", "");
    autoGenerator(moduleName, tableName, tablePrefix);
  }

  public static void autoGenerator(String moduleName, String tableName, String tablePrefix) {
    new AutoGenerator()
        .setGlobalConfig(getGlobalConfig())
        .setDataSource(getDataSourceConfig())
        .setPackageInfo(getPackageConfig(moduleName))
        .setStrategy(getStrategyConfig(tableName, tablePrefix))
        .setCfg(getInjectionConfig(moduleName))
        .setTemplate(getTemplateConfig())
        .execute();
  }

  private static String getDateTime() {
    LocalDateTime localDate = LocalDateTime.now();
    DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
    return localDate.format(formatter);
  }

  private static InjectionConfig getInjectionConfig(final String moduleName) {
    return new InjectionConfig() {
      @Override
      public void initMap() {
        Map map = new HashMap();
        map.put("dateTime", getDateTime());
        setMap(map);
        final String projectPath = System.getProperty("user.dir");
        List<FileOutConfig> fileOutConfigList = new ArrayList<FileOutConfig>();
        // 自定义配置会被优先输出
        fileOutConfigList.add(new FileOutConfig("/templates/mapper.xml.vm") {
          @Override
          public String outputFile(TableInfo tableInfo) {
            // 自定义输出文件名,如果entity设置了前后缀,此次注意xml的名称也会跟着发生变化
            return projectPath + "/src/main/resources/mapper/" +
                moduleName + "/" + tableInfo.getEntityName() + "Mapper" + StringPool.DOT_XML;
          }
        });
        setFileOutConfigList(fileOutConfigList);
      }
    };
  }

  private static StrategyConfig getStrategyConfig(String tableName, String tablePrefix) {
    return new StrategyConfig()
        .setNaming(NamingStrategy.underline_to_camel)
        .setColumnNaming(NamingStrategy.underline_to_camel)
        .setInclude(tableName)
        .setRestControllerStyle(REST_CONTROLLER_STYLE)
        .setEntityBuilderModel(true)
        .setControllerMappingHyphenStyle(true)
        .entityTableFieldAnnotationEnable(true)
        .setTablePrefix(tablePrefix + "_");
  }

  private static PackageConfig getPackageConfig(String moduleName) {
    return new PackageConfig()
        .setModuleName(moduleName)
        .setParent(PARENT_NAME)
        .setService("service")
        .setServiceImpl("service.impl")
        .setController("controller")
        .setEntity("entity");
  }

  private static DataSourceConfig getDataSourceConfig() {
    return new DataSourceConfig()
        .setUrl(JDBC_MYSQL_URL)
        .setDriverName(JDBC_DRIVER_NAME)
        .setUsername(JDBC_USERNAME)
        .setPassword(JDBC_PASSWORD);
  }

  private static GlobalConfig getGlobalConfig() {
    String projectPath = System.getProperty("user.dir");
    String filePath = projectPath + "/" + MODULAR_NAME + SRC_MAIN_JAVA;
    if (PlatformUtil.isWindows()) {
      filePath = filePath.replaceAll("/+|\\\\+", "\\\\");
    } else {
      filePath = filePath.replaceAll("/+|\\\\+", "/");
    }
    return new GlobalConfig()
        .setOutputDir(filePath)
        .setDateType(DateType.ONLY_DATE)
        .setIdType(IdType.UUID)
        .setAuthor(AUTHOR)
        .setBaseColumnList(true)
        .setSwagger2(true)
        .setEnableCache(false)
        .setBaseResultMap(true)
        .setOpen(false);
  }

  private static TemplateConfig getTemplateConfig() {
    return new TemplateConfig()
        .setController("/templates-generator/controller.java.vm")
        .setService("/templates-generator/service.java.vm")
        .setServiceImpl("/templates-generator/serviceImpl.java.vm")
        .setEntity("/templates-generator/entity.java.vm")
        .setMapper("/templates-generator/mapper.java.vm")
        .setXml("/templates-generator/mapper.xml.vm");
  }

  private static String scanner(String tip) {
    Scanner scanner = new Scanner(System.in);
    StringBuilder sb = new StringBuilder();
    sb.append("please input " + tip + " : ");
    System.out.println(sb.toString());
    if (scanner.hasNext()) {
      String ipt = scanner.next();
      if (StringUtils.isNotEmpty(ipt)) {
        return ipt;
      }
    }
    throw new MybatisPlusException("please input the correct " + tip + ". ");
  }
}

4. 执行CodeGenerator.java 里面的 main 方法,根据个人数据库表的配置与期望的工程目录的配置,依次输入模块名、表名、表前缀,比如我的数据库里面有张表叫做: header_click,执行 main 方法时,根据提示依次输入如下:header、header_click、#,最终会在项目工程目录里新增对应的自动生成的文件:

执行 main 方法时,控制台的日志输出如下:

please input 模块名 :
header
please input 表名 :
header_click
please input 表前缀(无前缀输入#) :
#
13:16:09.416 [main] DEBUG com.baomidou.mybatisplus.generator.AutoGenerator - ==========================准备生成文件...==========================
13:16:10.321 [main] DEBUG com.baomidou.mybatisplus.generator.engine.AbstractTemplateEngine - 创建目录: [D:\my-projects\generator-demo\src\main\java\com\miaoying\generator\modulardb\header\entity]
13:16:10.321 [main] DEBUG com.baomidou.mybatisplus.generator.engine.AbstractTemplateEngine - 创建目录: [D:\my-projects\generator-demo\src\main\java\com\miaoying\generator\modulardb\header\controller]
13:16:10.323 [main] DEBUG com.baomidou.mybatisplus.generator.engine.AbstractTemplateEngine - 创建目录: [D:\my-projects\generator-demo\src\main\java\com\miaoying\generator\modulardb\header\mapper\xml]
13:16:10.323 [main] DEBUG com.baomidou.mybatisplus.generator.engine.AbstractTemplateEngine - 创建目录: [D:\my-projects\generator-demo\src\main\java\com\miaoying\generator\modulardb\header\service]
13:16:10.323 [main] DEBUG com.baomidou.mybatisplus.generator.engine.AbstractTemplateEngine - 创建目录: [D:\my-projects\generator-demo\src\main\java\com\miaoying\generator\modulardb\header\service\impl]
13:16:10.328 [main] DEBUG org.apache.velocity - Initializing Velocity, Calling init()...
13:16:10.328 [main] DEBUG org.apache.velocity - Starting Apache Velocity v2.0
13:16:10.331 [main] DEBUG org.apache.velocity - Default Properties resource: org/apache/velocity/runtime/defaults/velocity.properties
13:16:10.352 [main] DEBUG org.apache.velocity - ResourceLoader instantiated: org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader
13:16:10.353 [main] DEBUG org.apache.velocity - initialized (class org.apache.velocity.runtime.resource.ResourceCacheImpl) with class java.util.Collections$SynchronizedMap cache map.
13:16:10.355 [main] DEBUG org.apache.velocity - Loaded System Directive: org.apache.velocity.runtime.directive.Stop
13:16:10.355 [main] DEBUG org.apache.velocity - Loaded System Directive: org.apache.velocity.runtime.directive.Define
13:16:10.356 [main] DEBUG org.apache.velocity - Loaded System Directive: org.apache.velocity.runtime.directive.Break
13:16:10.356 [main] DEBUG org.apache.velocity - Loaded System Directive: org.apache.velocity.runtime.directive.Evaluate
13:16:10.357 [main] DEBUG org.apache.velocity - Loaded System Directive: org.apache.velocity.runtime.directive.Macro
13:16:10.358 [main] DEBUG org.apache.velocity - Loaded System Directive: org.apache.velocity.runtime.directive.Parse
13:16:10.359 [main] DEBUG org.apache.velocity - Loaded System Directive: org.apache.velocity.runtime.directive.Include
13:16:10.359 [main] DEBUG org.apache.velocity - Loaded System Directive: org.apache.velocity.runtime.directive.Foreach
13:16:10.373 [main] DEBUG org.apache.velocity.parser - Created '20' parsers.
13:16:10.383 [main] DEBUG org.apache.velocity.macro - "velocimacro.library" is not set. Trying default library: VM_global_library.vm
13:16:10.383 [main] DEBUG org.apache.velocity.loader.file - Could not load resource 'VM_global_library.vm' from ResourceLoader org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader
13:16:10.383 [main] DEBUG org.apache.velocity.macro - Default library not found.
13:16:10.383 [main] DEBUG org.apache.velocity.macro - allowInline = true: VMs can be defined inline in templates
13:16:10.383 [main] DEBUG org.apache.velocity.macro - allowInlineToOverride = false: VMs defined inline may NOT replace previous VM definitions
13:16:10.383 [main] DEBUG org.apache.velocity.macro - allowInlineLocal = false: VMs defined inline will be global in scope if allowed.
13:16:10.383 [main] DEBUG org.apache.velocity.macro - autoload off: VM system will not automatically reload global library macros
13:16:10.394 [main] DEBUG org.apache.velocity.loader - ResourceManager: found /templates/mapper.xml.vm with loader org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader
13:16:10.396 [main] DEBUG org.apache.velocity.rendering - =================================================================
13:16:10.396 [main] DEBUG org.apache.velocity.rendering - == Class: class java.util.HashMap
13:16:10.397 [main] DEBUG org.apache.velocity.rendering - Reflecting class java.util.HashMap
13:16:10.399 [main] DEBUG org.apache.velocity.rendering - Adding public java.lang.Object java.util.HashMap.remove(java.lang.Object)
13:16:10.400 [main] DEBUG org.apache.velocity.rendering - Adding public boolean java.util.HashMap.remove(java.lang.Object,java.lang.Object)
13:16:10.400 [main] DEBUG org.apache.velocity.rendering - Adding public java.lang.Object java.util.HashMap.get(java.lang.Object)
13:16:10.400 [main] DEBUG org.apache.velocity.rendering - Adding public java.lang.Object java.util.HashMap.put(java.lang.Object,java.lang.Object)
13:16:10.400 [main] DEBUG org.apache.velocity.rendering - Adding public java.util.Collection java.util.HashMap.values()
13:16:10.400 [main] DEBUG org.apache.velocity.rendering - Adding public java.lang.Object java.util.HashMap.clone()
13:16:10.400 [main] DEBUG org.apache.velocity.rendering - Adding public void java.util.HashMap.clear()
13:16:10.400 [main] DEBUG org.apache.velocity.rendering - Adding public boolean java.util.HashMap.isEmpty()
13:16:10.400 [main] DEBUG org.apache.velocity.rendering - Adding public boolean java.util.HashMap.replace(java.lang.Object,java.lang.Object,java.lang.Object)
13:16:10.400 [main] DEBUG org.apache.velocity.rendering - Adding public java.lang.Object java.util.HashMap.replace(java.lang.Object,java.lang.Object)
13:16:10.400 [main] DEBUG org.apache.velocity.rendering - Adding public void java.util.HashMap.replaceAll(java.util.function.BiFunction)
13:16:10.400 [main] DEBUG org.apache.velocity.rendering - Adding public int java.util.HashMap.size()
13:16:10.400 [main] DEBUG org.apache.velocity.rendering - Adding public java.util.Set java.util.HashMap.entrySet()
13:16:10.400 [main] DEBUG org.apache.velocity.rendering - Adding public void java.util.HashMap.putAll(java.util.Map)
13:16:10.400 [main] DEBUG org.apache.velocity.rendering - Adding public java.lang.Object java.util.HashMap.putIfAbsent(java.lang.Object,java.lang.Object)
13:16:10.400 [main] DEBUG org.apache.velocity.rendering - Adding public java.util.Set java.util.HashMap.keySet()
13:16:10.400 [main] DEBUG org.apache.velocity.rendering - Adding public java.lang.Object java.util.HashMap.compute(java.lang.Object,java.util.function.BiFunction)
13:16:10.400 [main] DEBUG org.apache.velocity.rendering - Adding public java.lang.Object java.util.HashMap.computeIfAbsent(java.lang.Object,java.util.function.Function)
13:16:10.400 [main] DEBUG org.apache.velocity.rendering - Adding public java.lang.Object java.util.HashMap.computeIfPresent(java.lang.Object,java.util.function.BiFunction)
13:16:10.400 [main] DEBUG org.apache.velocity.rendering - Adding public boolean java.util.HashMap.containsKey(java.lang.Object)
13:16:10.400 [main] DEBUG org.apache.velocity.rendering - Adding public boolean java.util.HashMap.containsValue(java.lang.Object)
13:16:10.401 [main] DEBUG org.apache.velocity.rendering - Adding public void java.util.HashMap.forEach(java.util.function.BiConsumer)
13:16:10.401 [main] DEBUG org.apache.velocity.rendering - Adding public java.lang.Object java.util.HashMap.getOrDefault(java.lang.Object,java.lang.Object)
13:16:10.401 [main] DEBUG org.apache.velocity.rendering - Adding public java.lang.Object java.util.HashMap.merge(java.lang.Object,java.lang.Object,java.util.function.BiFunction)
13:16:10.401 [main] DEBUG org.apache.velocity.rendering - Reflecting interface java.util.Map
13:16:10.401 [main] DEBUG org.apache.velocity.rendering - Adding public abstract boolean java.util.Map.equals(java.lang.Object)
13:16:10.401 [main] DEBUG org.apache.velocity.rendering - Adding public abstract int java.util.Map.hashCode()
13:16:10.401 [main] DEBUG org.apache.velocity.rendering - Reflecting interface java.lang.Cloneable
13:16:10.401 [main] DEBUG org.apache.velocity.rendering - Reflecting interface java.io.Serializable
13:16:10.401 [main] DEBUG org.apache.velocity.rendering - Reflecting class java.util.AbstractMap
13:16:10.401 [main] DEBUG org.apache.velocity.rendering - Adding public java.lang.String java.util.AbstractMap.toString()
13:16:10.401 [main] DEBUG org.apache.velocity.rendering - Reflecting interface java.util.Map
13:16:10.401 [main] DEBUG org.apache.velocity.rendering - Reflecting class java.lang.Object
13:16:10.401 [main] DEBUG org.apache.velocity.rendering - Adding public final void java.lang.Object.wait() throws java.lang.InterruptedException
13:16:10.401 [main] DEBUG org.apache.velocity.rendering - Adding public final void java.lang.Object.wait(long,int) throws java.lang.InterruptedException
13:16:10.401 [main] DEBUG org.apache.velocity.rendering - Adding public final native void java.lang.Object.wait(long) throws java.lang.InterruptedException
13:16:10.402 [main] DEBUG org.apache.velocity.rendering - Adding public final native java.lang.Class java.lang.Object.getClass()
13:16:10.402 [main] DEBUG org.apache.velocity.rendering - Adding public final native void java.lang.Object.notify()
13:16:10.402 [main] DEBUG org.apache.velocity.rendering - Adding public final native void java.lang.Object.notifyAll()
13:16:10.402 [main] DEBUG org.apache.velocity.rendering - =================================================================
13:16:10.404 [main] DEBUG org.apache.velocity.rendering - =================================================================
13:16:10.404 [main] DEBUG org.apache.velocity.rendering - == Class: class com.baomidou.mybatisplus.generator.config.po.TableInfo
13:16:10.404 [main] DEBUG org.apache.velocity.rendering - Reflecting class com.baomidou.mybatisplus.generator.config.po.TableInfo
13:16:10.404 [main] DEBUG org.apache.velocity.rendering - Adding public java.lang.String com.baomidou.mybatisplus.generator.config.po.TableInfo.getName()
13:16:10.404 [main] DEBUG org.apache.velocity.rendering - Adding public java.util.List com.baomidou.mybatisplus.generator.config.po.TableInfo.getFields()
13:16:10.404 [main] DEBUG org.apache.velocity.rendering - Adding public void com.baomidou.mybatisplus.generator.config.po.TableInfo.setName(java.lang.String)
13:16:10.404 [main] DEBUG org.apache.velocity.rendering - Adding public void com.baomidou.mybatisplus.generator.config.po.TableInfo.setComment(java.lang.String)
13:16:10.404 [main] DEBUG org.apache.velocity.rendering - Adding public java.lang.String com.baomidou.mybatisplus.generator.config.po.TableInfo.getComment()
13:16:10.404 [main] DEBUG org.apache.velocity.rendering - Adding public boolean com.baomidou.mybatisplus.generator.config.po.TableInfo.isConvert()
13:16:10.404 [main] DEBUG org.apache.velocity.rendering - Adding public boolean com.baomidou.mybatisplus.generator.config.po.TableInfo.isLogicDelete(java.lang.String)
13:16:10.404 [main] DEBUG org.apache.velocity.rendering - Adding public java.lang.String com.baomidou.mybatisplus.generator.config.po.TableInfo.getServiceName()
13:16:10.404 [main] DEBUG org.apache.velocity.rendering - Adding public java.lang.String com.baomidou.mybatisplus.generator.config.po.TableInfo.getEntityPath()
13:16:10.404 [main] DEBUG org.apache.velocity.rendering - Adding public java.lang.String com.baomidou.mybatisplus.generator.config.po.TableInfo.getEntityName()
13:16:10.404 [main] DEBUG org.apache.velocity.rendering - Adding public java.lang.String com.baomidou.mybatisplus.generator.config.po.TableInfo.getMapperName()
13:16:10.404 [main] DEBUG org.apache.velocity.rendering - Adding public java.lang.String com.baomidou.mybatisplus.generator.config.po.TableInfo.getXmlName()
13:16:10.404 [main] DEBUG org.apache.velocity.rendering - Adding public void com.baomidou.mybatisplus.generator.config.po.TableInfo.setImportPackages(java.lang.String)
13:16:10.404 [main] DEBUG org.apache.velocity.rendering - Adding public java.lang.String com.baomidou.mybatisplus.generator.config.po.TableInfo.getServiceImplName()
13:16:10.404 [main] DEBUG org.apache.velocity.rendering - Adding public java.lang.String com.baomidou.mybatisplus.generator.config.po.TableInfo.getControllerName()
13:16:10.404 [main] DEBUG org.apache.velocity.rendering - Adding public void com.baomidou.mybatisplus.generator.config.po.TableInfo.setFields(java.util.List)
13:16:10.404 [main] DEBUG org.apache.velocity.rendering - Adding public void com.baomidou.mybatisplus.generator.config.po.TableInfo.setControllerName(java.lang.String)
13:16:10.404 [main] DEBUG org.apache.velocity.rendering - Adding public void com.baomidou.mybatisplus.generator.config.po.TableInfo.setServiceImplName(java.lang.String)
13:16:10.404 [main] DEBUG org.apache.velocity.rendering - Adding public void com.baomidou.mybatisplus.generator.config.po.TableInfo.setXmlName(java.lang.String)
13:16:10.404 [main] DEBUG org.apache.velocity.rendering - Adding public void com.baomidou.mybatisplus.generator.config.po.TableInfo.setEntityName(com.baomidou.mybatisplus.generator.config.StrategyConfig,java.lang.String)
13:16:10.404 [main] DEBUG org.apache.velocity.rendering - Adding public void com.baomidou.mybatisplus.generator.config.po.TableInfo.setServiceName(java.lang.String)
13:16:10.404 [main] DEBUG org.apache.velocity.rendering - Adding public void com.baomidou.mybatisplus.generator.config.po.TableInfo.setMapperName(java.lang.String)
13:16:10.404 [main] DEBUG org.apache.velocity.rendering - Adding public void com.baomidou.mybatisplus.generator.config.po.TableInfo.setCommonFields(java.util.List)
13:16:10.405 [main] DEBUG org.apache.velocity.rendering - Adding public java.util.Set com.baomidou.mybatisplus.generator.config.po.TableInfo.getImportPackages()
13:16:10.405 [main] DEBUG org.apache.velocity.rendering - Adding public java.util.List com.baomidou.mybatisplus.generator.config.po.TableInfo.getCommonFields()
13:16:10.405 [main] DEBUG org.apache.velocity.rendering - Adding public java.lang.String com.baomidou.mybatisplus.generator.config.po.TableInfo.getFieldNames()
13:16:10.405 [main] DEBUG org.apache.velocity.rendering - Adding public void com.baomidou.mybatisplus.generator.config.po.TableInfo.setConvert(boolean)
13:16:10.405 [main] DEBUG org.apache.velocity.rendering - Reflecting class java.lang.Object
13:16:10.405 [main] DEBUG org.apache.velocity.rendering - Adding public final void java.lang.Object.wait() throws java.lang.InterruptedException
13:16:10.405 [main] DEBUG org.apache.velocity.rendering - Adding public final void java.lang.Object.wait(long,int) throws java.lang.InterruptedException
13:16:10.405 [main] DEBUG org.apache.velocity.rendering - Adding public final native void java.lang.Object.wait(long) throws java.lang.InterruptedException
13:16:10.405 [main] DEBUG org.apache.velocity.rendering - Adding public boolean java.lang.Object.equals(java.lang.Object)
13:16:10.405 [main] DEBUG org.apache.velocity.rendering - Adding public java.lang.String java.lang.Object.toString()
13:16:10.405 [main] DEBUG org.apache.velocity.rendering - Adding public native int java.lang.Object.hashCode()
13:16:10.405 [main] DEBUG org.apache.velocity.rendering - Adding public final native java.lang.Class java.lang.Object.getClass()
13:16:10.405 [main] DEBUG org.apache.velocity.rendering - Adding public final native void java.lang.Object.notify()
13:16:10.405 [main] DEBUG org.apache.velocity.rendering - Adding public final native void java.lang.Object.notifyAll()
13:16:10.405 [main] DEBUG org.apache.velocity.rendering - =================================================================
13:16:10.406 [main] DEBUG org.apache.velocity.rendering - =================================================================
13:16:10.406 [main] DEBUG org.apache.velocity.rendering - == Class: class com.baomidou.mybatisplus.generator.config.po.TableField
13:16:10.406 [main] DEBUG org.apache.velocity.rendering - Reflecting class com.baomidou.mybatisplus.generator.config.po.TableField
13:16:10.406 [main] DEBUG org.apache.velocity.rendering - Adding public java.lang.String com.baomidou.mybatisplus.generator.config.po.TableField.getName()
13:16:10.406 [main] DEBUG org.apache.velocity.rendering - Adding public void com.baomidou.mybatisplus.generator.config.po.TableField.setName(java.lang.String)
13:16:10.406 [main] DEBUG org.apache.velocity.rendering - Adding public java.lang.String com.baomidou.mybatisplus.generator.config.po.TableField.getType()
13:16:10.406 [main] DEBUG org.apache.velocity.rendering - Adding public void com.baomidou.mybatisplus.generator.config.po.TableField.setComment(java.lang.String)
13:16:10.406 [main] DEBUG org.apache.velocity.rendering - Adding public java.lang.String com.baomidou.mybatisplus.generator.config.po.TableField.getComment()
13:16:10.406 [main] DEBUG org.apache.velocity.rendering - Adding public java.lang.String com.baomidou.mybatisplus.generator.config.po.TableField.getPropertyType()
13:16:10.406 [main] DEBUG org.apache.velocity.rendering - Adding public boolean com.baomidou.mybatisplus.generator.config.po.TableField.isConvert()
13:16:10.406 [main] DEBUG org.apache.velocity.rendering - Adding public java.lang.String com.baomidou.mybatisplus.generator.config.po.TableField.getPropertyName()
13:16:10.406 [main] DEBUG org.apache.velocity.rendering - Adding public void com.baomidou.mybatisplus.generator.config.po.TableField.setPropertyName(com.baomidou.mybatisplus.generator.config.StrategyConfig,java.lang.String)
13:16:10.406 [main] DEBUG org.apache.velocity.rendering - Adding public void com.baomidou.mybatisplus.generator.config.po.TableField.setKeyFlag(boolean)
13:16:10.406 [main] DEBUG org.apache.velocity.rendering - Adding public void com.baomidou.mybatisplus.generator.config.po.TableField.setType(java.lang.String)
13:16:10.406 [main] DEBUG org.apache.velocity.rendering - Adding public void com.baomidou.mybatisplus.generator.config.po.TableField.setColumnType(com.baomidou.mybatisplus.generator.config.rules.PropertyInfo)
13:16:10.406 [main] DEBUG org.apache.velocity.rendering - Adding public void com.baomidou.mybatisplus.generator.config.po.TableField.setCustomMap(java.util.Map)
13:16:10.407 [main] DEBUG org.apache.velocity.rendering - Adding public void com.baomidou.mybatisplus.generator.config.po.TableField.setFill(java.lang.String)
13:16:10.407 [main] DEBUG org.apache.velocity.rendering - Adding public void com.baomidou.mybatisplus.generator.config.po.TableField.setKeyIdentityFlag(boolean)
13:16:10.407 [main] DEBUG org.apache.velocity.rendering - Adding public com.baomidou.mybatisplus.generator.config.rules.PropertyInfo com.baomidou.mybatisplus.generator.config.po.TableField.getColumnType()
13:16:10.407 [main] DEBUG org.apache.velocity.rendering - Adding public java.lang.String com.baomidou.mybatisplus.generator.config.po.TableField.getCapitalName()
13:16:10.407 [main] DEBUG org.apache.velocity.rendering - Adding public boolean com.baomidou.mybatisplus.generator.config.po.TableField.isKeyFlag()
13:16:10.407 [main] DEBUG org.apache.velocity.rendering - Adding public void com.baomidou.mybatisplus.generator.config.po.TableField.setConvert(boolean)
13:16:10.407 [main] DEBUG org.apache.velocity.rendering - Adding public java.lang.String com.baomidou.mybatisplus.generator.config.po.TableField.getFill()
13:16:10.407 [main] DEBUG org.apache.velocity.rendering - Adding public boolean com.baomidou.mybatisplus.generator.config.po.TableField.isKeyIdentityFlag()
13:16:10.407 [main] DEBUG org.apache.velocity.rendering - Adding public java.util.Map com.baomidou.mybatisplus.generator.config.po.TableField.getCustomMap()
13:16:10.407 [main] DEBUG org.apache.velocity.rendering - Reflecting class java.lang.Object
13:16:10.407 [main] DEBUG org.apache.velocity.rendering - Adding public final void java.lang.Object.wait() throws java.lang.InterruptedException
13:16:10.407 [main] DEBUG org.apache.velocity.rendering - Adding public final void java.lang.Object.wait(long,int) throws java.lang.InterruptedException
13:16:10.407 [main] DEBUG org.apache.velocity.rendering - Adding public final native void java.lang.Object.wait(long) throws java.lang.InterruptedException
13:16:10.407 [main] DEBUG org.apache.velocity.rendering - Adding public boolean java.lang.Object.equals(java.lang.Object)
13:16:10.407 [main] DEBUG org.apache.velocity.rendering - Adding public java.lang.String java.lang.Object.toString()
13:16:10.407 [main] DEBUG org.apache.velocity.rendering - Adding public native int java.lang.Object.hashCode()
13:16:10.407 [main] DEBUG org.apache.velocity.rendering - Adding public final native java.lang.Class java.lang.Object.getClass()
13:16:10.407 [main] DEBUG org.apache.velocity.rendering - Adding public final native void java.lang.Object.notify()
13:16:10.407 [main] DEBUG org.apache.velocity.rendering - Adding public final native void java.lang.Object.notifyAll()
13:16:10.407 [main] DEBUG org.apache.velocity.rendering - =================================================================
13:16:10.412 [main] DEBUG com.baomidou.mybatisplus.generator.engine.AbstractTemplateEngine - 模板:/templates/mapper.xml.vm; 文件:D:\my-projects\generator-demo/src/main/resources/mapper/header/HeaderClickMapper.xml
13:16:10.435 [main] DEBUG org.apache.velocity.loader - ResourceManager: found /templates-generator/entity.java.vm with loader org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader
13:16:10.437 [main] DEBUG org.apache.velocity.rendering - =================================================================
13:16:10.438 [main] DEBUG org.apache.velocity.rendering - == Class: class java.lang.String
13:16:10.438 [main] DEBUG org.apache.velocity.rendering - Reflecting class java.lang.String
13:16:10.438 [main] DEBUG org.apache.velocity.rendering - Adding public boolean java.lang.String.equals(java.lang.Object)
13:16:10.438 [main] DEBUG org.apache.velocity.rendering - Adding public java.lang.String java.lang.String.toString()
13:16:10.438 [main] DEBUG org.apache.velocity.rendering - Adding public int java.lang.String.hashCode()
13:16:10.438 [main] DEBUG org.apache.velocity.rendering - Adding public int java.lang.String.compareTo(java.lang.String)
13:16:10.438 [main] DEBUG org.apache.velocity.rendering - Adding public int java.lang.String.compareTo(java.lang.Object)
13:16:10.438 [main] DEBUG org.apache.velocity.rendering - Adding public int java.lang.String.indexOf(java.lang.String,int)
13:16:10.438 [main] DEBUG org.apache.velocity.rendering - Adding public int java.lang.String.indexOf(java.lang.String)
13:16:10.438 [main] DEBUG org.apache.velocity.rendering - Adding public int java.lang.String.indexOf(int,int)
13:16:10.438 [main] DEBUG org.apache.velocity.rendering - Adding public int java.lang.String.indexOf(int)
13:16:10.438 [main] DEBUG org.apache.velocity.rendering - Adding public static java.lang.String java.lang.String.valueOf(int)
13:16:10.438 [main] DEBUG org.apache.velocity.rendering - Adding public static java.lang.String java.lang.String.valueOf(long)
13:16:10.438 [main] DEBUG org.apache.velocity.rendering - Adding public static java.lang.String java.lang.String.valueOf(float)
13:16:10.438 [main] DEBUG org.apache.velocity.rendering - Adding public static java.lang.String java.lang.String.valueOf(boolean)
13:16:10.438 [main] DEBUG org.apache.velocity.rendering - Adding public static java.lang.String java.lang.String.valueOf(char[])
13:16:10.438 [main] DEBUG org.apache.velocity.rendering - Adding public static java.lang.String java.lang.String.valueOf(char[],int,int)
13:16:10.438 [main] DEBUG org.apache.velocity.rendering - Adding public static java.lang.String java.lang.String.valueOf(java.lang.Object)
13:16:10.438 [main] DEBUG org.apache.velocity.rendering - Adding public static java.lang.String java.lang.String.valueOf(char)
13:16:10.438 [main] DEBUG org.apache.velocity.rendering - Adding public static java.lang.String java.lang.String.valueOf(double)
13:16:10.438 [main] DEBUG org.apache.velocity.rendering - Adding public char java.lang.String.charAt(int)
13:16:10.438 [main] DEBUG org.apache.velocity.rendering - Adding public int java.lang.String.codePointAt(int)
13:16:10.438 [main] DEBUG org.apache.velocity.rendering - Adding public int java.lang.String.codePointBefore(int)
13:16:10.438 [main] DEBUG org.apache.velocity.rendering - Adding public int java.lang.String.codePointCount(int,int)
13:16:10.438 [main] DEBUG org.apache.velocity.rendering - Adding public int java.lang.String.compareToIgnoreCase(java.lang.String)
13:16:10.438 [main] DEBUG org.apache.velocity.rendering - Adding public java.lang.String java.lang.String.concat(java.lang.String)
13:16:10.438 [main] DEBUG org.apache.velocity.rendering - Adding public boolean java.lang.String.contains(java.lang.CharSequence)
13:16:10.438 [main] DEBUG org.apache.velocity.rendering - Adding public boolean java.lang.String.contentEquals(java.lang.CharSequence)
13:16:10.438 [main] DEBUG org.apache.velocity.rendering - Adding public boolean java.lang.String.contentEquals(java.lang.StringBuffer)
13:16:10.438 [main] DEBUG org.apache.velocity.rendering - Adding public static java.lang.String java.lang.String.copyValueOf(char[])
13:16:10.438 [main] DEBUG org.apache.velocity.rendering - Adding public static java.lang.String java.lang.String.copyValueOf(char[],int,int)
13:16:10.441 [main] DEBUG org.apache.velocity.rendering - Adding public boolean java.lang.String.endsWith(java.lang.String)
13:16:10.441 [main] DEBUG org.apache.velocity.rendering - Adding public boolean java.lang.String.equalsIgnoreCase(java.lang.String)
13:16:10.441 [main] DEBUG org.apache.velocity.rendering - Adding public static java.lang.String java.lang.String.format(java.util.Locale,java.lang.String,java.lang.Object[])
13:16:10.441 [main] DEBUG org.apache.velocity.rendering - Adding public static java.lang.String java.lang.String.format(java.lang.String,java.lang.Object[])
13:16:10.441 [main] DEBUG org.apache.velocity.rendering - Adding public void java.lang.String.getBytes(int,int,byte[],int)
13:16:10.441 [main] DEBUG org.apache.velocity.rendering - Adding public byte[] java.lang.String.getBytes(java.nio.charset.Charset)
13:16:10.441 [main] DEBUG org.apache.velocity.rendering - Adding public byte[] java.lang.String.getBytes(java.lang.String) throws java.io.UnsupportedEncodingException
13:16:10.441 [main] DEBUG org.apache.velocity.rendering - Adding public byte[] java.lang.String.getBytes()
13:16:10.441 [main] DEBUG org.apache.velocity.rendering - Adding public void java.lang.String.getChars(int,int,char[],int)
13:16:10.441 [main] DEBUG org.apache.velocity.rendering - Adding public native java.lang.String java.lang.String.intern()
13:16:10.441 [main] DEBUG org.apache.velocity.rendering - Adding public boolean java.lang.String.isEmpty()
13:16:10.441 [main] DEBUG org.apache.velocity.rendering - Adding public static java.lang.String java.lang.String.join(java.lang.CharSequence,java.lang.CharSequence[])
13:16:10.441 [main] DEBUG org.apache.velocity.rendering - Adding public static java.lang.String java.lang.String.join(java.lang.CharSequence,java.lang.Iterable)
13:16:10.441 [main] DEBUG org.apache.velocity.rendering - Adding public int java.lang.String.lastIndexOf(int)
13:16:10.441 [main] DEBUG org.apache.velocity.rendering - Adding public int java.lang.String.lastIndexOf(java.lang.String)
13:16:10.441 [main] DEBUG org.apache.velocity.rendering - Adding public int java.lang.String.lastIndexOf(java.lang.String,int)
13:16:10.441 [main] DEBUG org.apache.velocity.rendering - Adding public int java.lang.String.lastIndexOf(int,int)
13:16:10.441 [main] DEBUG org.apache.velocity.rendering - Adding public int java.lang.String.length()
13:16:10.441 [main] DEBUG org.apache.velocity.rendering - Adding public boolean java.lang.String.matches(java.lang.String)
13:16:10.441 [main] DEBUG org.apache.velocity.rendering - Adding public int java.lang.String.offsetByCodePoints(int,int)
13:16:10.441 [main] DEBUG org.apache.velocity.rendering - Adding public boolean java.lang.String.regionMatches(int,java.lang.String,int,int)
13:16:10.441 [main] DEBUG org.apache.velocity.rendering - Adding public boolean java.lang.String.regionMatches(boolean,int,java.lang.String,int,int)
13:16:10.441 [main] DEBUG org.apache.velocity.rendering - Adding public java.lang.String java.lang.String.replace(char,char)
13:16:10.441 [main] DEBUG org.apache.velocity.rendering - Adding public java.lang.String java.lang.String.replace(java.lang.CharSequence,java.lang.CharSequence)
13:16:10.441 [main] DEBUG org.apache.velocity.rendering - Adding public java.lang.String java.lang.String.replaceAll(java.lang.String,java.lang.String)
13:16:10.441 [main] DEBUG org.apache.velocity.rendering - Adding public java.lang.String java.lang.String.replaceFirst(java.lang.String,java.lang.String)
13:16:10.441 [main] DEBUG org.apache.velocity.rendering - Adding public java.lang.String[] java.lang.String.split(java.lang.String)
13:16:10.441 [main] DEBUG org.apache.velocity.rendering - Adding public java.lang.String[] java.lang.String.split(java.lang.String,int)
13:16:10.441 [main] DEBUG org.apache.velocity.rendering - Adding public boolean java.lang.String.startsWith(java.lang.String,int)
13:16:10.441 [main] DEBUG org.apache.velocity.rendering - Adding public boolean java.lang.String.startsWith(java.lang.String)
13:16:10.441 [main] DEBUG org.apache.velocity.rendering - Adding public java.lang.CharSequence java.lang.String.subSequence(int,int)
13:16:10.441 [main] DEBUG org.apache.velocity.rendering - Adding public java.lang.String java.lang.String.substring(int)
13:16:10.441 [main] DEBUG org.apache.velocity.rendering - Adding public java.lang.String java.lang.String.substring(int,int)
13:16:10.441 [main] DEBUG org.apache.velocity.rendering - Adding public char[] java.lang.String.toCharArray()
13:16:10.441 [main] DEBUG org.apache.velocity.rendering - Adding public java.lang.String java.lang.String.toLowerCase(java.util.Locale)
13:16:10.441 [main] DEBUG org.apache.velocity.rendering - Adding public java.lang.String java.lang.String.toLowerCase()
13:16:10.441 [main] DEBUG org.apache.velocity.rendering - Adding public java.lang.String java.lang.String.toUpperCase()
13:16:10.441 [main] DEBUG org.apache.velocity.rendering - Adding public java.lang.String java.lang.String.toUpperCase(java.util.Locale)
13:16:10.441 [main] DEBUG org.apache.velocity.rendering - Adding public java.lang.String java.lang.String.trim()
13:16:10.442 [main] DEBUG org.apache.velocity.rendering - Reflecting interface java.io.Serializable
13:16:10.442 [main] DEBUG org.apache.velocity.rendering - Reflecting interface java.lang.Comparable
13:16:10.442 [main] DEBUG org.apache.velocity.rendering - Reflecting interface java.lang.CharSequence
13:16:10.442 [main] DEBUG org.apache.velocity.rendering - Adding public default java.util.stream.IntStream java.lang.CharSequence.chars()
13:16:10.442 [main] DEBUG org.apache.velocity.rendering - Adding public default java.util.stream.IntStream java.lang.CharSequence.codePoints()
13:16:10.442 [main] DEBUG org.apache.velocity.rendering - Reflecting class java.lang.Object
13:16:10.442 [main] DEBUG org.apache.velocity.rendering - Adding public final void java.lang.Object.wait() throws java.lang.InterruptedException
13:16:10.442 [main] DEBUG org.apache.velocity.rendering - Adding public final void java.lang.Object.wait(long,int) throws java.lang.InterruptedException
13:16:10.442 [main] DEBUG org.apache.velocity.rendering - Adding public final native void java.lang.Object.wait(long) throws java.lang.InterruptedException
13:16:10.442 [main] DEBUG org.apache.velocity.rendering - Adding public final native java.lang.Class java.lang.Object.getClass()
13:16:10.442 [main] DEBUG org.apache.velocity.rendering - Adding public final native void java.lang.Object.notify()
13:16:10.442 [main] DEBUG org.apache.velocity.rendering - Adding public final native void java.lang.Object.notifyAll()
13:16:10.442 [main] DEBUG org.apache.velocity.rendering - =================================================================
13:16:10.444 [main] DEBUG org.apache.velocity.rendering - =================================================================
13:16:10.444 [main] DEBUG org.apache.velocity.rendering - == Class: class org.apache.velocity.runtime.directive.ForeachScope
13:16:10.445 [main] DEBUG org.apache.velocity.rendering - Reflecting class org.apache.velocity.runtime.directive.ForeachScope
13:16:10.445 [main] DEBUG org.apache.velocity.rendering - Adding public boolean org.apache.velocity.runtime.directive.ForeachScope.hasNext()
13:16:10.445 [main] DEBUG org.apache.velocity.rendering - Adding public boolean org.apache.velocity.runtime.directive.ForeachScope.getFirst()
13:16:10.445 [main] DEBUG org.apache.velocity.rendering - Adding public boolean org.apache.velocity.runtime.directive.ForeachScope.getLast()
13:16:10.445 [main] DEBUG org.apache.velocity.rendering - Adding public int org.apache.velocity.runtime.directive.ForeachScope.getIndex()
13:16:10.445 [main] DEBUG org.apache.velocity.rendering - Adding public int org.apache.velocity.runtime.directive.ForeachScope.getCount()
13:16:10.445 [main] DEBUG org.apache.velocity.rendering - Adding public boolean org.apache.velocity.runtime.directive.ForeachScope.isLast()
13:16:10.445 [main] DEBUG org.apache.velocity.rendering - Adding public boolean org.apache.velocity.runtime.directive.ForeachScope.isFirst()
13:16:10.445 [main] DEBUG org.apache.velocity.rendering - Adding public boolean org.apache.velocity.runtime.directive.ForeachScope.getHasNext()
13:16:10.445 [main] DEBUG org.apache.velocity.rendering - Reflecting class org.apache.velocity.runtime.directive.Scope
13:16:10.445 [main] DEBUG org.apache.velocity.rendering - Adding public java.lang.Object org.apache.velocity.runtime.directive.Scope.get(java.lang.Object)
13:16:10.445 [main] DEBUG org.apache.velocity.rendering - Adding public java.lang.Object org.apache.velocity.runtime.directive.Scope.put(java.lang.Object,java.lang.Object)
13:16:10.445 [main] DEBUG org.apache.velocity.rendering - Adding public java.util.Set org.apache.velocity.runtime.directive.Scope.entrySet()
13:16:10.445 [main] DEBUG org.apache.velocity.rendering - Adding public org.apache.velocity.runtime.directive.Scope org.apache.velocity.runtime.directive.Scope.getParent()
13:16:10.445 [main] DEBUG org.apache.velocity.rendering - Adding public java.lang.String org.apache.velocity.runtime.directive.Scope.set(java.lang.Object,java.lang.Object)
13:16:10.445 [main] DEBUG org.apache.velocity.rendering - Adding public org.apache.velocity.runtime.directive.Scope$Info org.apache.velocity.runtime.directive.Scope.getInfo()
13:16:10.445 [main] DEBUG org.apache.velocity.rendering - Adding public org.apache.velocity.runtime.directive.Scope org.apache.velocity.runtime.directive.Scope.getTopmost()
13:16:10.445 [main] DEBUG org.apache.velocity.rendering - Adding public java.lang.Object org.apache.velocity.runtime.directive.Scope.getReplaced()
13:16:10.445 [main] DEBUG org.apache.velocity.rendering - Reflecting class java.util.AbstractMap
13:16:10.445 [main] DEBUG org.apache.velocity.rendering - Adding public java.lang.Object java.util.AbstractMap.remove(java.lang.Object)
13:16:10.445 [main] DEBUG org.apache.velocity.rendering - Adding public boolean java.util.AbstractMap.equals(java.lang.Object)
13:16:10.446 [main] DEBUG org.apache.velocity.rendering - Adding public java.lang.String java.util.AbstractMap.toString()
13:16:10.446 [main] DEBUG org.apache.velocity.rendering - Adding public java.util.Collection java.util.AbstractMap.values()
13:16:10.446 [main] DEBUG org.apache.velocity.rendering - Adding public int java.util.AbstractMap.hashCode()
13:16:10.446 [main] DEBUG org.apache.velocity.rendering - Adding public void java.util.AbstractMap.clear()
13:16:10.446 [main] DEBUG org.apache.velocity.rendering - Adding public boolean java.util.AbstractMap.isEmpty()
13:16:10.446 [main] DEBUG org.apache.velocity.rendering - Adding public int java.util.AbstractMap.size()
13:16:10.446 [main] DEBUG org.apache.velocity.rendering - Adding public void java.util.AbstractMap.putAll(java.util.Map)
13:16:10.446 [main] DEBUG org.apache.velocity.rendering - Adding public java.util.Set java.util.AbstractMap.keySet()
13:16:10.446 [main] DEBUG org.apache.velocity.rendering - Adding public boolean java.util.AbstractMap.containsKey(java.lang.Object)
13:16:10.446 [main] DEBUG org.apache.velocity.rendering - Adding public boolean java.util.AbstractMap.containsValue(java.lang.Object)
13:16:10.446 [main] DEBUG org.apache.velocity.rendering - Reflecting interface java.util.Map
13:16:10.446 [main] DEBUG org.apache.velocity.rendering - Adding public default boolean java.util.Map.remove(java.lang.Object,java.lang.Object)
13:16:10.446 [main] DEBUG org.apache.velocity.rendering - Adding public default java.lang.Object java.util.Map.replace(java.lang.Object,java.lang.Object)
13:16:10.446 [main] DEBUG org.apache.velocity.rendering - Adding public default boolean java.util.Map.replace(java.lang.Object,java.lang.Object,java.lang.Object)
13:16:10.446 [main] DEBUG org.apache.velocity.rendering - Adding public default void java.util.Map.replaceAll(java.util.function.BiFunction)
13:16:10.446 [main] DEBUG org.apache.velocity.rendering - Adding public default java.lang.Object java.util.Map.putIfAbsent(java.lang.Object,java.lang.Object)
13:16:10.446 [main] DEBUG org.apache.velocity.rendering - Adding public default java.lang.Object java.util.Map.compute(java.lang.Object,java.util.function.BiFunction)
13:16:10.446 [main] DEBUG org.apache.velocity.rendering - Adding public default java.lang.Object java.util.Map.computeIfAbsent(java.lang.Object,java.util.function.Function)
13:16:10.446 [main] DEBUG org.apache.velocity.rendering - Adding public default java.lang.Object java.util.Map.computeIfPresent(java.lang.Object,java.util.function.BiFunction)
13:16:10.446 [main] DEBUG org.apache.velocity.rendering - Adding public default void java.util.Map.forEach(java.util.function.BiConsumer)
13:16:10.446 [main] DEBUG org.apache.velocity.rendering - Adding public default java.lang.Object java.util.Map.getOrDefault(java.lang.Object,java.lang.Object)
13:16:10.446 [main] DEBUG org.apache.velocity.rendering - Adding public default java.lang.Object java.util.Map.merge(java.lang.Object,java.lang.Object,java.util.function.BiFunction)
13:16:10.446 [main] DEBUG org.apache.velocity.rendering - Reflecting class java.lang.Object
13:16:10.446 [main] DEBUG org.apache.velocity.rendering - Adding public final void java.lang.Object.wait() throws java.lang.InterruptedException
13:16:10.446 [main] DEBUG org.apache.velocity.rendering - Adding public final void java.lang.Object.wait(long,int) throws java.lang.InterruptedException
13:16:10.446 [main] DEBUG org.apache.velocity.rendering - Adding public final native void java.lang.Object.wait(long) throws java.lang.InterruptedException
13:16:10.446 [main] DEBUG org.apache.velocity.rendering - Adding public final native java.lang.Class java.lang.Object.getClass()
13:16:10.446 [main] DEBUG org.apache.velocity.rendering - Adding public final native void java.lang.Object.notify()
13:16:10.446 [main] DEBUG org.apache.velocity.rendering - Adding public final native void java.lang.Object.notifyAll()
13:16:10.446 [main] DEBUG org.apache.velocity.rendering - =================================================================
13:16:10.449 [main] DEBUG com.baomidou.mybatisplus.generator.engine.AbstractTemplateEngine - 模板:/templates-generator/entity.java.vm; 文件:D:\my-projects\generator-demo\src\main\java\com\miaoying\generator\modulardb\header\entity\HeaderClick.java
13:16:10.451 [main] DEBUG org.apache.velocity.loader - ResourceManager: found /templates-generator/mapper.java.vm with loader org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader
13:16:10.453 [main] DEBUG com.baomidou.mybatisplus.generator.engine.AbstractTemplateEngine - 模板:/templates-generator/mapper.java.vm; 文件:D:\my-projects\generator-demo\src\main\java\com\miaoying\generator\modulardb\header\mapper\HeaderClickMapper.java
13:16:10.461 [main] DEBUG org.apache.velocity.loader - ResourceManager: found /templates-generator/mapper.xml.vm with loader org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader
13:16:10.465 [main] DEBUG com.baomidou.mybatisplus.generator.engine.AbstractTemplateEngine - 模板:/templates-generator/mapper.xml.vm; 文件:D:\my-projects\generator-demo\src\main\java\com\miaoying\generator\modulardb\header\mapper\xml\HeaderClickMapper.xml
13:16:10.467 [main] DEBUG org.apache.velocity.loader - ResourceManager: found /templates-generator/service.java.vm with loader org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader
13:16:10.469 [main] DEBUG com.baomidou.mybatisplus.generator.engine.AbstractTemplateEngine - 模板:/templates-generator/service.java.vm; 文件:D:\my-projects\generator-demo\src\main\java\com\miaoying\generator\modulardb\header\service\IHeaderClickService.java
13:16:10.482 [main] DEBUG org.apache.velocity.loader - ResourceManager: found /templates-generator/serviceImpl.java.vm with loader org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader
13:16:10.484 [main] DEBUG com.baomidou.mybatisplus.generator.engine.AbstractTemplateEngine - 模板:/templates-generator/serviceImpl.java.vm; 文件:D:\my-projects\generator-demo\src\main\java\com\miaoying\generator\modulardb\header\service\impl\HeaderClickServiceImpl.java
13:16:10.496 [main] DEBUG org.apache.velocity.loader - ResourceManager: found /templates-generator/controller.java.vm with loader org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader
13:16:10.498 [main] DEBUG com.baomidou.mybatisplus.generator.engine.AbstractTemplateEngine - 模板:/templates-generator/controller.java.vm; 文件:D:\my-projects\generator-demo\src\main\java\com\miaoying\generator\modulardb\header\controller\HeaderClickController.java
13:16:10.498 [main] DEBUG com.baomidou.mybatisplus.generator.AutoGenerator - ==========================文件生成完成!!!==========================

Process finished with exit code 0

到此这篇关于使用mybatis-plus-generator进行代码自动生成的方法的文章就介绍到这了,更多相关mybatis-plus-generator代码自动生成内容请搜索我们以前的文章或继续浏览下面的相关文章希望大家以后多多支持我们!

(0)

相关推荐

  • IDEA Maven Mybatis generator 自动生成代码(实例讲解)

    IDEA Maven Mybatis generator 自动生成代码的实例讲解 一.安装配置maven以及在Idea中配置maven 安装过程步骤可以看上面的博文,里面介绍得很详细. 二.建数据表 DROP TABLE IF EXISTS `t_user`; CREATE TABLE `t_user` ( `id` varchar(100) NOT NULL, `username` varchar(20) DEFAULT NULL, `password` varchar(20) DEFAULT

  • MyBatis框架之mybatis逆向工程自动生成代码

    Mybatis属于半自动ORM,在使用这个框架中,工作量最大的就是书写Mapping的映射文件,由于手动书写很容易出错,我们可以利用Mybatis-Generator来帮我们自动生成文件. 逆向工程 1.什么是逆向工程 mybaits需要程序员自己编写sql语句,mybatis官方提供逆向工程 可以针对单表自动生成mybatis执行所需要的代码(mapper.java,mapper.xml.po..) 企业实际开发中,常用的逆向工程方式: 由于数据库的表生成java代码. 2.下载逆向工程 my

  • 如何使用mybatis-generator自动生成代码

    这篇文章主要介绍了如何使用mybatis-generator自动生成代码,文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需要的朋友可以参考下 1.在pom文件中添加mybatis-generator插件 <plugin> <groupId>org.mybatis.generator</groupId> <artifactId>mybatis-generator-maven-plugin</artifactId> &l

  • Spring和MyBatis整合自动生成代码里面text类型遇到的坑

    Spring和MyBatis整合以后,使用自动生成代码工具生成dao和mapper配置文件,生成步骤如下(以Intelli idea为例). 1.编写生成代码配置文件generatorConfig.xml. <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE generatorConfiguration PUBLIC "-//mybatis.org//DTD MyBatis Generator

  • SSM框架通过mybatis-generator自动生成代码(推荐)

    一.首先eclipse配置好maven环境,并且创建好一个SSM框架的工程 二.在pom.xml中添加plugin <build> <finalName>ssm_web</finalName> <pluginManagement> <plugins> <plugin> <groupId>org.mybatis.generator</groupId> <artifactId>mybatis-gener

  • mybatis plus generator 根据数据库自动生成实体类的实现示例

    目录 1.添加依赖 2.编写代码生成器 3.运行主程序,输入表名 1.添加依赖 <dependency> <groupId>com.baomidou</groupId> <artifactId>mybatis-plus-boot-starter</artifactId> <version>3.3.2</version> </dependency> <dependency> <groupId&g

  • 使用mybatis-plus-generator进行代码自动生成的方法

    为了解放程序员的双手,减少重复性代码的编写,推荐使用插件:mybatis-plus-generator 进行代码自动生成.下面我将详细介绍通过mybatis-plus-generator 插件自动生成 controller.service.mapper.serviceImpl相关代码. 项目工程目录总览如下: 1. 使用 idea 创建 maven 项目,引入相关依赖,项目pom文件如下所示: <?xml version="1.0" encoding="UTF-8&qu

  • 用Python代码自动生成文献的IEEE引用格式的实现

    今天尝试着将引用文献的格式按照IEEE的标准重新排版,感觉手动一条一条改太麻烦,而且很容易出错,所以尝试着用Python写了一个小程序用于根据BibTeX引用格式来生成IEEE引用格式. 先看代码,如下: import re def getIeeeJournalFormat(bibInfo): """ 生成期刊文献的IEEE引用格式:{作者}, "{文章标题}," {期刊名称}, vol. {卷数}, no. {编号}, pp. {页码}, {年份}. :

  • Vue-cli Eslint在vscode里代码自动格式化的方法

    编辑器另外一个很重要的功能就是代码格式化了,VS Code默认提供常见文件的格式化,如.js,.html等. 添加对.vue文件的格式化支持 这里我们添加对 .vue 文件的格式化支持. 1. 安装 Vetur 插件 2. 在 VS Code 的设置中添加如下规则: { "vetur.format.defaultFormatter": { "html": "prettier", "css": "prettier&qu

  • springboot 通过代码自动生成pid的方法

    springboot项目部署 平时我们在部署springboot打成jar方式部署得时候,大多数都会编写启动脚本,脚本有很多种写法,但大多数意思都是一样的,java -jar 启动项目,获取进程pid保存到指定文件中.关闭程序时,获取进程pid kill -9 $pid.获取pid有很多种写法,简答粗暴netstat -nlp port | grep port | grep -v .其实springboot本身就有更简单方式来处理这种问题,两行代码就搞定. @SpringBootApplicat

  • Springboot Mybatis Plus自动生成工具类详解代码

    前言 代码生成器,也叫逆向工程,是根据数据库里的表结构,自动生成对应的实体类.映射文件和接口. 看到很多小伙伴在为数据库生成实体类发愁,现分享给大家,提高开发效率. 一.pom依赖 <dependency> <groupId>com.baomidou</groupId> <artifactId>mybatis-plus-boot-starter</artifactId> <version>3.4.1</version> &

  • SpringBoot项目使用mybatis-plus逆向自动生成全套代码

    目录 1.在你的SpringBoot项目下新建子模块项目 2.在此模块下新建一个包与一个java类 类名: CodeGenerator 3.在 resources 下新建 文件夹,用来存放 mapper文件 4.配置CodeGenerator类 5.启动代码生成类main方法 6.删除文件 1.在你的SpringBoot项目下新建子模块项目 pom.xml添加以下依赖: <properties> <java.version>1.8</java.version> <

  • python实现自动生成C++代码的代码生成器

    遇到的问题 工作中遇到这么一个事,需要写很多C++的底层数据库类,但这些类大同小异,无非是增删改查,如果人工来写代码,既费力又容易出错:而借用python的代码自动生成,可以轻松搞定: (类比JAVA中的Hibernate自动生成的数据库底层操作代码) 下面介绍使用python字符串替换的方法: Python字符串替换的几种方法 1. 字符串替换 将需要替换的内容使用格式化符替代,后续补上替换内容: template = "hello %s , your website is %s "

  • Java实现自动生成缩略图片

    本文实例为大家分享了Java实现自动生成缩略图片的具体代码,供大家参考,具体内容如下 一.自动生成缩略图方法: package writeimg;   import java.awt.geom.AffineTransform; import java.awt.image.AffineTransformOp; import java.awt.image.BufferedImage; import java.io.File; import java.io.IOException; import ja

随机推荐