使用mybatis plus自动生成controller、service、dao、mapper、entity代码

官网:http://mp.baomidou.com(这个项目不仅仅可以用于代码生成,还有分页等其他功能,是对mybatis的一层封装)

 

要求:基于sql自动生成domain、controller、service、dao、mapper

 

效果:红框里的代码是自动生成的

 

 

用法

 mysql:手动建两张表用于测试

CREATE TABLE `user` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '标识',
  `user_name` varchar(50) DEFAULT NULL COMMENT '用户名',
  `user_sex` tinyint(4) DEFAULT NULL COMMENT '性别,0:男 1:女',
  `user_address` varchar(255) DEFAULT NULL COMMENT '用户地址',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COMMENT='用户表';

CREATE TABLE `order_info` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '标识',
  `order_name` varchar(50) DEFAULT NULL COMMENT '订单名',
  `order_address` varchar(255) DEFAULT NULL COMMENT '订单地址',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='订单表';

 

新建一个项目(我是基于spring boot的)

spring boot版本:2.0.3.RELEASE

 

pom.xml

 <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
        <groupId>mysql</groupId>
        <artifactId>mysql-connector-java</artifactId>
        <scope>runtime</scope>
</dependency>
<!-- mybatis plus插件 -->
<dependency>
        <groupId>com.baomidou</groupId>
        <artifactId>mybatis-plus-boot-starter</artifactId>
        <version>3.0-alpha</version>
</dependency>
<!-- 模板引擎 -->
<dependency>
        <groupId>org.apache.velocity</groupId>
       <artifactId>velocity-engine-core</artifactId>
        <version>2.0</version>
</dependency>
<dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-test</artifactId>
        <scope>test</scope>
</dependency>

 

application.yml

spring:
  datasource:
    username: root
    password: root123
    driver-class-name: com.mysql.jdbc.Driver
    url: jdbc:mysql://localhost:3306/mybatis?useUnicode=true&characterEncoding=utf-8&useSSL=false
mybatis-plus:
    global-config:
      db-config:
        db-type: mysql

 

启动类

package com.wang.mybatisnew;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

@SpringBootApplication
@MapperScan("com.wang.mybatisnew.*.mapper")
public class MybatisnewApplication {

    public static void main(String[] args) {
        SpringApplication.run(MybatisnewApplication.class, args);
    }
}

 

启动类同级目录新建一个代码生成类:

package com.wang.mybatisnew;

import com.baomidou.mybatisplus.annotation.DbType;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.generator.AutoGenerator;
import com.baomidou.mybatisplus.generator.config.DataSourceConfig;
import com.baomidou.mybatisplus.generator.config.GlobalConfig;
import com.baomidou.mybatisplus.generator.config.PackageConfig;
import com.baomidou.mybatisplus.generator.config.StrategyConfig;
import com.baomidou.mybatisplus.generator.config.rules.NamingStrategy;

/**
 * mybatis代码生成工具
 * 官网:http://mp.baomidou.com
 * @Author wly
 * @Date 2018/7/4 14:10
 */
public class MybatisPlusGenerate {
    public static void main(String[] args) {
        AutoGenerator mpg = new AutoGenerator();
        // =============================全局配置===============================
        mpg.setGlobalConfig(new GlobalConfig()
                // 覆盖输出到xxx目录
                .setFileOverride(true).setOutputDir("E://work//mybatisnew//src//main//java//")
//                .setFileOverride(true).setOutputDir("D://wly")
                // 主键生成策略 生成BaseResultMap
                .setIdType(IdType.AUTO).setBaseResultMap(true)
                // 指定作者
                .setAuthor("wly")
                // 设置Controller、Service、ServiceImpl、Dao、Mapper文件名称,%s是依据表名转换来的
                .setControllerName("%sController").setServiceName("MP%sService").setServiceImplName("%sServiceImpl").setMapperName("%sDao").setXmlName("%sMapper"));
        // ================================数据源配置============================
        mpg.setDataSource(new DataSourceConfig()
                // 用户名、密码、驱动、url
                .setUsername("root").setPassword("root123")
                .setDbType(DbType.MYSQL).setDriverName("com.mysql.jdbc.Driver")
                .setUrl("jdbc:mysql://localhost:3306/mybatis?useUnicode=true&characterEncoding=utf-8&useSSL=false")
        );
        // ===============================包名配置:父包.模块.controller===============================
        mpg.setPackageInfo(new PackageConfig()
                // 父包名 模块名
                .setParent("com.wang.mybatisnew").setModuleName("user")
                // 分层包名
                .setController("controller").setService("service").setServiceImpl("service.impl").setEntity("domain").setMapper("mapper"));
        // =====================================策略配置==================================
        mpg.setStrategy(new StrategyConfig()
                // 命名策略:实体的类名和属性名按下划线转驼峰 user_info -> userInfo
                .setNaming(NamingStrategy.underline_to_camel)
                // controller生成@RestCcontroller
                .setRestControllerStyle(true));
        // 执行生成
        mpg.execute();

    }
}

 

控制台输出

运行main方法即可生成代码

"D:\dev tools\jdk\jdk8\bin\java" "-javaagent:D:\dev tools\ide\ideaIU-2017.2.5.win\lib\idea_rt.jar=51550:D:\dev tools\ide\ideaIU-2017.2.5.win\bin" -Dfile.encoding=UTF-8 -classpath "D:\dev tools\jdk\jdk8\jre\lib\charsets.jar;D:\dev tools\jdk\jdk8\jre\lib\deploy.jar;D:\dev tools\jdk\jdk8\jre\lib\ext\access-bridge-64.jar;D:\dev tools\jdk\jdk8\jre\lib\ext\cldrdata.jar;D:\dev tools\jdk\jdk8\jre\lib\ext\dnsns.jar;D:\dev tools\jdk\jdk8\jre\lib\ext\jaccess.jar;D:\dev tools\jdk\jdk8\jre\lib\ext\jfxrt.jar;D:\dev tools\jdk\jdk8\jre\lib\ext\localedata.jar;D:\dev tools\jdk\jdk8\jre\lib\ext\nashorn.jar;D:\dev tools\jdk\jdk8\jre\lib\ext\sunec.jar;D:\dev tools\jdk\jdk8\jre\lib\ext\sunjce_provider.jar;D:\dev tools\jdk\jdk8\jre\lib\ext\sunmscapi.jar;D:\dev tools\jdk\jdk8\jre\lib\ext\sunpkcs11.jar;D:\dev tools\jdk\jdk8\jre\lib\ext\zipfs.jar;D:\dev tools\jdk\jdk8\jre\lib\javaws.jar;D:\dev tools\jdk\jdk8\jre\lib\jce.jar;D:\dev tools\jdk\jdk8\jre\lib\jfr.jar;D:\dev tools\jdk\jdk8\jre\lib\jfxswt.jar;D:\dev tools\jdk\jdk8\jre\lib\jsse.jar;D:\dev tools\jdk\jdk8\jre\lib\management-agent.jar;D:\dev tools\jdk\jdk8\jre\lib\plugin.jar;D:\dev tools\jdk\jdk8\jre\lib\resources.jar;D:\dev tools\jdk\jdk8\jre\lib\rt.jar;E:\work\mybatisnew\target\classes;E:\work\localRepository\org\springframework\boot\spring-boot-starter-web\2.0.3.RELEASE\spring-boot-starter-web-2.0.3.RELEASE.jar;E:\work\localRepository\org\springframework\boot\spring-boot-starter\2.0.3.RELEASE\spring-boot-starter-2.0.3.RELEASE.jar;E:\work\localRepository\org\springframework\boot\spring-boot\2.0.3.RELEASE\spring-boot-2.0.3.RELEASE.jar;E:\work\localRepository\org\springframework\boot\spring-boot-starter-logging\2.0.3.RELEASE\spring-boot-starter-logging-2.0.3.RELEASE.jar;E:\work\localRepository\ch\qos\logback\logback-classic\1.2.3\logback-classic-1.2.3.jar;E:\work\localRepository\ch\qos\logback\logback-core\1.2.3\logback-core-1.2.3.jar;E:\work\localRepository\org\apache\logging\log4j\log4j-to-slf4j\2.10.0\log4j-to-slf4j-2.10.0.jar;E:\work\localRepository\org\apache\logging\log4j\log4j-api\2.10.0\log4j-api-2.10.0.jar;E:\work\localRepository\org\slf4j\jul-to-slf4j\1.7.25\jul-to-slf4j-1.7.25.jar;E:\work\localRepository\javax\annotation\javax.annotation-api\1.3.2\javax.annotation-api-1.3.2.jar;E:\work\localRepository\org\yaml\snakeyaml\1.19\snakeyaml-1.19.jar;E:\work\localRepository\org\springframework\boot\spring-boot-starter-json\2.0.3.RELEASE\spring-boot-starter-json-2.0.3.RELEASE.jar;E:\work\localRepository\com\fasterxml\jackson\core\jackson-databind\2.9.6\jackson-databind-2.9.6.jar;E:\work\localRepository\com\fasterxml\jackson\core\jackson-annotations\2.9.0\jackson-annotations-2.9.0.jar;E:\work\localRepository\com\fasterxml\jackson\core\jackson-core\2.9.6\jackson-core-2.9.6.jar;E:\work\localRepository\com\fasterxml\jackson\datatype\jackson-datatype-jdk8\2.9.6\jackson-datatype-jdk8-2.9.6.jar;E:\work\localRepository\com\fasterxml\jackson\datatype\jackson-datatype-jsr310\2.9.6\jackson-datatype-jsr310-2.9.6.jar;E:\work\localRepository\com\fasterxml\jackson\module\jackson-module-parameter-names\2.9.6\jackson-module-parameter-names-2.9.6.jar;E:\work\localRepository\org\springframework\boot\spring-boot-starter-tomcat\2.0.3.RELEASE\spring-boot-starter-tomcat-2.0.3.RELEASE.jar;E:\work\localRepository\org\apache\tomcat\embed\tomcat-embed-core\8.5.31\tomcat-embed-core-8.5.31.jar;E:\work\localRepository\org\apache\tomcat\embed\tomcat-embed-el\8.5.31\tomcat-embed-el-8.5.31.jar;E:\work\localRepository\org\apache\tomcat\embed\tomcat-embed-websocket\8.5.31\tomcat-embed-websocket-8.5.31.jar;E:\work\localRepository\org\hibernate\validator\hibernate-validator\6.0.10.Final\hibernate-validator-6.0.10.Final.jar;E:\work\localRepository\javax\validation\validation-api\2.0.1.Final\validation-api-2.0.1.Final.jar;E:\work\localRepository\org\jboss\logging\jboss-logging\3.3.2.Final\jboss-logging-3.3.2.Final.jar;E:\work\localRepository\com\fasterxml\classmate\1.3.4\classmate-1.3.4.jar;E:\work\localRepository\org\springframework\spring-web\5.0.7.RELEASE\spring-web-5.0.7.RELEASE.jar;E:\work\localRepository\org\springframework\spring-beans\5.0.7.RELEASE\spring-beans-5.0.7.RELEASE.jar;E:\work\localRepository\org\springframework\spring-webmvc\5.0.7.RELEASE\spring-webmvc-5.0.7.RELEASE.jar;E:\work\localRepository\org\springframework\spring-aop\5.0.7.RELEASE\spring-aop-5.0.7.RELEASE.jar;E:\work\localRepository\org\springframework\spring-context\5.0.7.RELEASE\spring-context-5.0.7.RELEASE.jar;E:\work\localRepository\org\springframework\spring-expression\5.0.7.RELEASE\spring-expression-5.0.7.RELEASE.jar;E:\work\localRepository\mysql\mysql-connector-java\5.1.46\mysql-connector-java-5.1.46.jar;E:\work\localRepository\com\baomidou\mybatis-plus-boot-starter\3.0-alpha\mybatis-plus-boot-starter-3.0-alpha.jar;E:\work\localRepository\com\baomidou\mybatis-plus\3.0-alpha\mybatis-plus-3.0-alpha.jar;E:\work\localRepository\com\baomidou\mybatis-plus-extension\3.0-alpha\mybatis-plus-extension-3.0-alpha.jar;E:\work\localRepository\com\baomidou\mybatis-plus-core\3.0-alpha\mybatis-plus-core-3.0-alpha.jar;E:\work\localRepository\com\baomidou\mybatis-plus-annotation\3.0-alpha\mybatis-plus-annotation-3.0-alpha.jar;E:\work\localRepository\com\github\jsqlparser\jsqlparser\1.2\jsqlparser-1.2.jar;E:\work\localRepository\org\mybatis\mybatis-spring\1.3.2\mybatis-spring-1.3.2.jar;E:\work\localRepository\org\mybatis\mybatis\3.4.6\mybatis-3.4.6.jar;E:\work\localRepository\com\baomidou\mybatis-plus-generator\3.0-alpha\mybatis-plus-generator-3.0-alpha.jar;E:\work\localRepository\org\freemarker\freemarker\2.3.28\freemarker-2.3.28.jar;E:\work\localRepository\org\springframework\boot\spring-boot-autoconfigure\2.0.3.RELEASE\spring-boot-autoconfigure-2.0.3.RELEASE.jar;E:\work\localRepository\org\springframework\boot\spring-boot-starter-jdbc\2.0.3.RELEASE\spring-boot-starter-jdbc-2.0.3.RELEASE.jar;E:\work\localRepository\com\zaxxer\HikariCP\2.7.9\HikariCP-2.7.9.jar;E:\work\localRepository\org\springframework\spring-jdbc\5.0.7.RELEASE\spring-jdbc-5.0.7.RELEASE.jar;E:\work\localRepository\org\springframework\spring-tx\5.0.7.RELEASE\spring-tx-5.0.7.RELEASE.jar;E:\work\localRepository\org\springframework\boot\spring-boot-configuration-processor\2.0.3.RELEASE\spring-boot-configuration-processor-2.0.3.RELEASE.jar;E:\work\localRepository\org\apache\velocity\velocity-engine-core\2.0\velocity-engine-core-2.0.jar;E:\work\localRepository\org\apache\commons\commons-lang3\3.7\commons-lang3-3.7.jar;E:\work\localRepository\org\slf4j\slf4j-api\1.7.25\slf4j-api-1.7.25.jar;E:\work\localRepository\org\springframework\spring-core\5.0.7.RELEASE\spring-core-5.0.7.RELEASE.jar;E:\work\localRepository\org\springframework\spring-jcl\5.0.7.RELEASE\spring-jcl-5.0.7.RELEASE.jar" com.wang.mybatisnew.MybatisPlusGenerate
09:36:52.691 [main] DEBUG com.baomidou.mybatisplus.generator.AutoGenerator - ==========================准备生成文件...==========================
09:36:53.360 [main] DEBUG com.baomidou.mybatisplus.generator.engine.AbstractTemplateEngine - 创建目录: [E://work//mybatisnew//src//main//java//\com\wang\mybatisnew\user\domain]
09:36:53.362 [main] DEBUG com.baomidou.mybatisplus.generator.engine.AbstractTemplateEngine - 创建目录: [E://work//mybatisnew//src//main//java//\com\wang\mybatisnew\user\controller]
09:36:53.365 [main] DEBUG com.baomidou.mybatisplus.generator.engine.AbstractTemplateEngine - 创建目录: [E://work//mybatisnew//src//main//java//\com\wang\mybatisnew\user\mapper\xml]
09:36:53.366 [main] DEBUG com.baomidou.mybatisplus.generator.engine.AbstractTemplateEngine - 创建目录: [E://work//mybatisnew//src//main//java//\com\wang\mybatisnew\user\service]
09:36:53.368 [main] DEBUG com.baomidou.mybatisplus.generator.engine.AbstractTemplateEngine - 创建目录: [E://work//mybatisnew//src//main//java//\com\wang\mybatisnew\user\service\impl]
09:36:53.369 [main] DEBUG org.apache.velocity - Initializing Velocity, Calling init()...
09:36:53.369 [main] DEBUG org.apache.velocity - Starting Apache Velocity v2.0
09:36:53.372 [main] DEBUG org.apache.velocity - Default Properties resource: org/apache/velocity/runtime/defaults/velocity.properties
09:36:53.385 [main] DEBUG org.apache.velocity - ResourceLoader instantiated: org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader
09:36:53.387 [main] DEBUG org.apache.velocity - initialized (class org.apache.velocity.runtime.resource.ResourceCacheImpl) with class java.util.Collections$SynchronizedMap cache map.
09:36:53.389 [main] DEBUG org.apache.velocity - Loaded System Directive: org.apache.velocity.runtime.directive.Stop
09:36:53.391 [main] DEBUG org.apache.velocity - Loaded System Directive: org.apache.velocity.runtime.directive.Define
09:36:53.391 [main] DEBUG org.apache.velocity - Loaded System Directive: org.apache.velocity.runtime.directive.Break
09:36:53.393 [main] DEBUG org.apache.velocity - Loaded System Directive: org.apache.velocity.runtime.directive.Evaluate
09:36:53.394 [main] DEBUG org.apache.velocity - Loaded System Directive: org.apache.velocity.runtime.directive.Macro
09:36:53.396 [main] DEBUG org.apache.velocity - Loaded System Directive: org.apache.velocity.runtime.directive.Parse
09:36:53.397 [main] DEBUG org.apache.velocity - Loaded System Directive: org.apache.velocity.runtime.directive.Include
09:36:53.398 [main] DEBUG org.apache.velocity - Loaded System Directive: org.apache.velocity.runtime.directive.Foreach
09:36:53.423 [main] DEBUG org.apache.velocity.parser - Created '20' parsers.
09:36:53.458 [main] DEBUG org.apache.velocity.macro - "velocimacro.library" is not set. Trying default library: VM_global_library.vm
09:36:53.459 [main] DEBUG org.apache.velocity.loader.file - Could not load resource 'VM_global_library.vm' from ResourceLoader org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader
09:36:53.459 [main] DEBUG org.apache.velocity.macro - Default library not found.
09:36:53.459 [main] DEBUG org.apache.velocity.macro - allowInline = true: VMs can be defined inline in templates
09:36:53.459 [main] DEBUG org.apache.velocity.macro - allowInlineToOverride = false: VMs defined inline may NOT replace previous VM definitions
09:36:53.459 [main] DEBUG org.apache.velocity.macro - allowInlineLocal = false: VMs defined inline will be global in scope if allowed.
09:36:53.459 [main] DEBUG org.apache.velocity.macro - autoload off: VM system will not automatically reload global library macros
09:36:53.525 [main] DEBUG org.apache.velocity.loader - ResourceManager: found /templates/entity.java.vm with loader org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader
09:36:53.529 [main] DEBUG org.apache.velocity.rendering - =================================================================
09:36:53.529 [main] DEBUG org.apache.velocity.rendering - == Class: class java.util.HashMap
09:36:53.531 [main] DEBUG org.apache.velocity.rendering - Reflecting class java.util.HashMap
09:36:53.532 [main] DEBUG org.apache.velocity.rendering - Adding public java.lang.Object java.util.HashMap.remove(java.lang.Object)
09:36:53.532 [main] DEBUG org.apache.velocity.rendering - Adding public boolean java.util.HashMap.remove(java.lang.Object,java.lang.Object)
09:36:53.532 [main] DEBUG org.apache.velocity.rendering - Adding public java.lang.Object java.util.HashMap.get(java.lang.Object)
09:36:53.532 [main] DEBUG org.apache.velocity.rendering - Adding public java.lang.Object java.util.HashMap.put(java.lang.Object,java.lang.Object)
09:36:53.532 [main] DEBUG org.apache.velocity.rendering - Adding public java.util.Collection java.util.HashMap.values()
09:36:53.532 [main] DEBUG org.apache.velocity.rendering - Adding public java.lang.Object java.util.HashMap.clone()
09:36:53.532 [main] DEBUG org.apache.velocity.rendering - Adding public void java.util.HashMap.clear()
09:36:53.532 [main] DEBUG org.apache.velocity.rendering - Adding public boolean java.util.HashMap.isEmpty()
09:36:53.533 [main] DEBUG org.apache.velocity.rendering - Adding public boolean java.util.HashMap.replace(java.lang.Object,java.lang.Object,java.lang.Object)
09:36:53.533 [main] DEBUG org.apache.velocity.rendering - Adding public java.lang.Object java.util.HashMap.replace(java.lang.Object,java.lang.Object)
09:36:53.533 [main] DEBUG org.apache.velocity.rendering - Adding public void java.util.HashMap.replaceAll(java.util.function.BiFunction)
09:36:53.533 [main] DEBUG org.apache.velocity.rendering - Adding public int java.util.HashMap.size()
09:36:53.533 [main] DEBUG org.apache.velocity.rendering - Adding public java.util.Set java.util.HashMap.entrySet()
09:36:53.533 [main] DEBUG org.apache.velocity.rendering - Adding public void java.util.HashMap.putAll(java.util.Map)
09:36:53.533 [main] DEBUG org.apache.velocity.rendering - Adding public java.lang.Object java.util.HashMap.putIfAbsent(java.lang.Object,java.lang.Object)
09:36:53.533 [main] DEBUG org.apache.velocity.rendering - Adding public java.util.Set java.util.HashMap.keySet()
09:36:53.533 [main] DEBUG org.apache.velocity.rendering - Adding public java.lang.Object java.util.HashMap.compute(java.lang.Object,java.util.function.BiFunction)
09:36:53.533 [main] DEBUG org.apache.velocity.rendering - Adding public java.lang.Object java.util.HashMap.computeIfAbsent(java.lang.Object,java.util.function.Function)
09:36:53.533 [main] DEBUG org.apache.velocity.rendering - Adding public java.lang.Object java.util.HashMap.computeIfPresent(java.lang.Object,java.util.function.BiFunction)
09:36:53.533 [main] DEBUG org.apache.velocity.rendering - Adding public boolean java.util.HashMap.containsKey(java.lang.Object)
09:36:53.533 [main] DEBUG org.apache.velocity.rendering - Adding public boolean java.util.HashMap.containsValue(java.lang.Object)
09:36:53.533 [main] DEBUG org.apache.velocity.rendering - Adding public void java.util.HashMap.forEach(java.util.function.BiConsumer)
09:36:53.533 [main] DEBUG org.apache.velocity.rendering - Adding public java.lang.Object java.util.HashMap.getOrDefault(java.lang.Object,java.lang.Object)
09:36:53.533 [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)
09:36:53.533 [main] DEBUG org.apache.velocity.rendering - Reflecting interface java.util.Map
09:36:53.533 [main] DEBUG org.apache.velocity.rendering - Adding public abstract boolean java.util.Map.equals(java.lang.Object)
09:36:53.534 [main] DEBUG org.apache.velocity.rendering - Adding public abstract int java.util.Map.hashCode()
09:36:53.534 [main] DEBUG org.apache.velocity.rendering - Reflecting interface java.lang.Cloneable
09:36:53.534 [main] DEBUG org.apache.velocity.rendering - Reflecting interface java.io.Serializable
09:36:53.534 [main] DEBUG org.apache.velocity.rendering - Reflecting class java.util.AbstractMap
09:36:53.534 [main] DEBUG org.apache.velocity.rendering - Adding public java.lang.String java.util.AbstractMap.toString()
09:36:53.534 [main] DEBUG org.apache.velocity.rendering - Reflecting interface java.util.Map
09:36:53.534 [main] DEBUG org.apache.velocity.rendering - Reflecting class java.lang.Object
09:36:53.534 [main] DEBUG org.apache.velocity.rendering - Adding public final void java.lang.Object.wait() throws java.lang.InterruptedException
09:36:53.534 [main] DEBUG org.apache.velocity.rendering - Adding public final void java.lang.Object.wait(long,int) throws java.lang.InterruptedException
09:36:53.535 [main] DEBUG org.apache.velocity.rendering - Adding public final native void java.lang.Object.wait(long) throws java.lang.InterruptedException
09:36:53.535 [main] DEBUG org.apache.velocity.rendering - Adding public final native java.lang.Class java.lang.Object.getClass()
09:36:53.535 [main] DEBUG org.apache.velocity.rendering - Adding public final native void java.lang.Object.notify()
09:36:53.535 [main] DEBUG org.apache.velocity.rendering - Adding public final native void java.lang.Object.notifyAll()
09:36:53.535 [main] DEBUG org.apache.velocity.rendering - =================================================================
09:36:53.539 [main] DEBUG org.apache.velocity.rendering - =================================================================
09:36:53.539 [main] DEBUG org.apache.velocity.rendering - == Class: class com.baomidou.mybatisplus.generator.config.po.TableInfo
09:36:53.539 [main] DEBUG org.apache.velocity.rendering - Reflecting class com.baomidou.mybatisplus.generator.config.po.TableInfo
09:36:53.539 [main] DEBUG org.apache.velocity.rendering - Adding public java.lang.String com.baomidou.mybatisplus.generator.config.po.TableInfo.getName()
09:36:53.539 [main] DEBUG org.apache.velocity.rendering - Adding public java.util.List com.baomidou.mybatisplus.generator.config.po.TableInfo.getFields()
09:36:53.539 [main] DEBUG org.apache.velocity.rendering - Adding public void com.baomidou.mybatisplus.generator.config.po.TableInfo.setName(java.lang.String)
09:36:53.539 [main] DEBUG org.apache.velocity.rendering - Adding public java.lang.String com.baomidou.mybatisplus.generator.config.po.TableInfo.getComment()
09:36:53.539 [main] DEBUG org.apache.velocity.rendering - Adding public void com.baomidou.mybatisplus.generator.config.po.TableInfo.setComment(java.lang.String)
09:36:53.539 [main] DEBUG org.apache.velocity.rendering - Adding public void com.baomidou.mybatisplus.generator.config.po.TableInfo.setMapperName(java.lang.String)
09:36:53.539 [main] DEBUG org.apache.velocity.rendering - Adding public void com.baomidou.mybatisplus.generator.config.po.TableInfo.setXmlName(java.lang.String)
09:36:53.539 [main] DEBUG org.apache.velocity.rendering - Adding public void com.baomidou.mybatisplus.generator.config.po.TableInfo.setServiceName(java.lang.String)
09:36:53.539 [main] DEBUG org.apache.velocity.rendering - Adding public void com.baomidou.mybatisplus.generator.config.po.TableInfo.setFields(java.util.List)
09:36:53.539 [main] DEBUG org.apache.velocity.rendering - Adding public java.lang.String com.baomidou.mybatisplus.generator.config.po.TableInfo.getControllerName()
09:36:53.540 [main] DEBUG org.apache.velocity.rendering - Adding public void com.baomidou.mybatisplus.generator.config.po.TableInfo.setServiceImplName(java.lang.String)
09:36:53.540 [main] DEBUG org.apache.velocity.rendering - Adding public void com.baomidou.mybatisplus.generator.config.po.TableInfo.setImportPackages(java.lang.String)
09:36:53.540 [main] DEBUG org.apache.velocity.rendering - Adding public java.lang.String com.baomidou.mybatisplus.generator.config.po.TableInfo.getServiceImplName()
09:36:53.540 [main] DEBUG org.apache.velocity.rendering - Adding public void com.baomidou.mybatisplus.generator.config.po.TableInfo.setControllerName(java.lang.String)
09:36:53.540 [main] DEBUG org.apache.velocity.rendering - Adding public boolean com.baomidou.mybatisplus.generator.config.po.TableInfo.isConvert()
09:36:53.540 [main] DEBUG org.apache.velocity.rendering - Adding public boolean com.baomidou.mybatisplus.generator.config.po.TableInfo.isLogicDelete(java.lang.String)
09:36:53.540 [main] DEBUG org.apache.velocity.rendering - Adding public java.lang.String com.baomidou.mybatisplus.generator.config.po.TableInfo.getServiceName()
09:36:53.540 [main] DEBUG org.apache.velocity.rendering - Adding public java.lang.String com.baomidou.mybatisplus.generator.config.po.TableInfo.getMapperName()
09:36:53.540 [main] DEBUG org.apache.velocity.rendering - Adding public java.lang.String com.baomidou.mybatisplus.generator.config.po.TableInfo.getXmlName()
09:36:53.540 [main] DEBUG org.apache.velocity.rendering - Adding public java.lang.String com.baomidou.mybatisplus.generator.config.po.TableInfo.getEntityPath()
09:36:53.540 [main] DEBUG org.apache.velocity.rendering - Adding public java.lang.String com.baomidou.mybatisplus.generator.config.po.TableInfo.getEntityName()
09:36:53.540 [main] DEBUG org.apache.velocity.rendering - Adding public java.util.List com.baomidou.mybatisplus.generator.config.po.TableInfo.getImportPackages()
09:36:53.540 [main] DEBUG org.apache.velocity.rendering - Adding public void com.baomidou.mybatisplus.generator.config.po.TableInfo.setConvert(boolean)
09:36:53.540 [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)
09:36:53.542 [main] DEBUG org.apache.velocity.rendering - Adding public void com.baomidou.mybatisplus.generator.config.po.TableInfo.setCommonFields(java.util.List)
09:36:53.542 [main] DEBUG org.apache.velocity.rendering - Adding public java.util.List com.baomidou.mybatisplus.generator.config.po.TableInfo.getCommonFields()
09:36:53.542 [main] DEBUG org.apache.velocity.rendering - Adding public java.lang.String com.baomidou.mybatisplus.generator.config.po.TableInfo.getFieldNames()
09:36:53.542 [main] DEBUG org.apache.velocity.rendering - Reflecting class java.lang.Object
09:36:53.542 [main] DEBUG org.apache.velocity.rendering - Adding public final void java.lang.Object.wait() throws java.lang.InterruptedException
09:36:53.543 [main] DEBUG org.apache.velocity.rendering - Adding public final void java.lang.Object.wait(long,int) throws java.lang.InterruptedException
09:36:53.543 [main] DEBUG org.apache.velocity.rendering - Adding public final native void java.lang.Object.wait(long) throws java.lang.InterruptedException
09:36:53.543 [main] DEBUG org.apache.velocity.rendering - Adding public boolean java.lang.Object.equals(java.lang.Object)
09:36:53.543 [main] DEBUG org.apache.velocity.rendering - Adding public java.lang.String java.lang.Object.toString()
09:36:53.543 [main] DEBUG org.apache.velocity.rendering - Adding public native int java.lang.Object.hashCode()
09:36:53.543 [main] DEBUG org.apache.velocity.rendering - Adding public final native java.lang.Class java.lang.Object.getClass()
09:36:53.543 [main] DEBUG org.apache.velocity.rendering - Adding public final native void java.lang.Object.notify()
09:36:53.543 [main] DEBUG org.apache.velocity.rendering - Adding public final native void java.lang.Object.notifyAll()
09:36:53.543 [main] DEBUG org.apache.velocity.rendering - =================================================================
09:36:53.547 [main] DEBUG org.apache.velocity.rendering - =================================================================
09:36:53.547 [main] DEBUG org.apache.velocity.rendering - == Class: class com.baomidou.mybatisplus.generator.config.po.TableField
09:36:53.547 [main] DEBUG org.apache.velocity.rendering - Reflecting class com.baomidou.mybatisplus.generator.config.po.TableField
09:36:53.548 [main] DEBUG org.apache.velocity.rendering - Adding public java.lang.String com.baomidou.mybatisplus.generator.config.po.TableField.getName()
09:36:53.548 [main] DEBUG org.apache.velocity.rendering - Adding public void com.baomidou.mybatisplus.generator.config.po.TableField.setName(java.lang.String)
09:36:53.549 [main] DEBUG org.apache.velocity.rendering - Adding public java.lang.String com.baomidou.mybatisplus.generator.config.po.TableField.getType()
09:36:53.550 [main] DEBUG org.apache.velocity.rendering - Adding public java.lang.String com.baomidou.mybatisplus.generator.config.po.TableField.getComment()
09:36:53.550 [main] DEBUG org.apache.velocity.rendering - Adding public void com.baomidou.mybatisplus.generator.config.po.TableField.setComment(java.lang.String)
09:36:53.550 [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)
09:36:53.550 [main] DEBUG org.apache.velocity.rendering - Adding public java.lang.String com.baomidou.mybatisplus.generator.config.po.TableField.getPropertyName()
09:36:53.550 [main] DEBUG org.apache.velocity.rendering - Adding public java.lang.String com.baomidou.mybatisplus.generator.config.po.TableField.getPropertyType()
09:36:53.550 [main] DEBUG org.apache.velocity.rendering - Adding public boolean com.baomidou.mybatisplus.generator.config.po.TableField.isConvert()
09:36:53.550 [main] DEBUG org.apache.velocity.rendering - Adding public void com.baomidou.mybatisplus.generator.config.po.TableField.setKeyIdentityFlag(boolean)
09:36:53.550 [main] DEBUG org.apache.velocity.rendering - Adding public void com.baomidou.mybatisplus.generator.config.po.TableField.setConvert(boolean)
09:36:53.550 [main] DEBUG org.apache.velocity.rendering - Adding public void com.baomidou.mybatisplus.generator.config.po.TableField.setKeyFlag(boolean)
09:36:53.550 [main] DEBUG org.apache.velocity.rendering - Adding public boolean com.baomidou.mybatisplus.generator.config.po.TableField.isKeyFlag()
09:36:53.554 [main] DEBUG org.apache.velocity.rendering - Adding public void com.baomidou.mybatisplus.generator.config.po.TableField.setType(java.lang.String)
09:36:53.554 [main] DEBUG org.apache.velocity.rendering - Adding public void com.baomidou.mybatisplus.generator.config.po.TableField.setFill(java.lang.String)
09:36:53.554 [main] DEBUG org.apache.velocity.rendering - Adding public void com.baomidou.mybatisplus.generator.config.po.TableField.setCustomMap(java.util.Map)
09:36:53.554 [main] DEBUG org.apache.velocity.rendering - Adding public void com.baomidou.mybatisplus.generator.config.po.TableField.setColumnType(com.baomidou.mybatisplus.generator.config.rules.DbColumnType)
09:36:53.560 [main] DEBUG org.apache.velocity.rendering - Adding public com.baomidou.mybatisplus.generator.config.rules.DbColumnType com.baomidou.mybatisplus.generator.config.po.TableField.getColumnType()
09:36:53.560 [main] DEBUG org.apache.velocity.rendering - Adding public java.lang.String com.baomidou.mybatisplus.generator.config.po.TableField.getFill()
09:36:53.560 [main] DEBUG org.apache.velocity.rendering - Adding public java.util.Map com.baomidou.mybatisplus.generator.config.po.TableField.getCustomMap()
09:36:53.560 [main] DEBUG org.apache.velocity.rendering - Adding public java.lang.String com.baomidou.mybatisplus.generator.config.po.TableField.getCapitalName()
09:36:53.560 [main] DEBUG org.apache.velocity.rendering - Adding public boolean com.baomidou.mybatisplus.generator.config.po.TableField.isKeyIdentityFlag()
09:36:53.560 [main] DEBUG org.apache.velocity.rendering - Reflecting class java.lang.Object
09:36:53.560 [main] DEBUG org.apache.velocity.rendering - Adding public final void java.lang.Object.wait() throws java.lang.InterruptedException
09:36:53.560 [main] DEBUG org.apache.velocity.rendering - Adding public final void java.lang.Object.wait(long,int) throws java.lang.InterruptedException
09:36:53.562 [main] DEBUG org.apache.velocity.rendering - Adding public final native void java.lang.Object.wait(long) throws java.lang.InterruptedException
09:36:53.562 [main] DEBUG org.apache.velocity.rendering - Adding public boolean java.lang.Object.equals(java.lang.Object)
09:36:53.562 [main] DEBUG org.apache.velocity.rendering - Adding public java.lang.String java.lang.Object.toString()
09:36:53.562 [main] DEBUG org.apache.velocity.rendering - Adding public native int java.lang.Object.hashCode()
09:36:53.562 [main] DEBUG org.apache.velocity.rendering - Adding public final native java.lang.Class java.lang.Object.getClass()
09:36:53.562 [main] DEBUG org.apache.velocity.rendering - Adding public final native void java.lang.Object.notify()
09:36:53.562 [main] DEBUG org.apache.velocity.rendering - Adding public final native void java.lang.Object.notifyAll()
09:36:53.562 [main] DEBUG org.apache.velocity.rendering - =================================================================
09:36:53.572 [main] DEBUG org.apache.velocity.rendering - =================================================================
09:36:53.572 [main] DEBUG org.apache.velocity.rendering - == Class: class java.lang.String
09:36:53.572 [main] DEBUG org.apache.velocity.rendering - Reflecting class java.lang.String
09:36:53.572 [main] DEBUG org.apache.velocity.rendering - Adding public boolean java.lang.String.equals(java.lang.Object)
09:36:53.572 [main] DEBUG org.apache.velocity.rendering - Adding public java.lang.String java.lang.String.toString()
09:36:53.573 [main] DEBUG org.apache.velocity.rendering - Adding public int java.lang.String.hashCode()
09:36:53.573 [main] DEBUG org.apache.velocity.rendering - Adding public int java.lang.String.compareTo(java.lang.String)
09:36:53.573 [main] DEBUG org.apache.velocity.rendering - Adding public int java.lang.String.compareTo(java.lang.Object)
09:36:53.573 [main] DEBUG org.apache.velocity.rendering - Adding public int java.lang.String.indexOf(java.lang.String,int)
09:36:53.573 [main] DEBUG org.apache.velocity.rendering - Adding public int java.lang.String.indexOf(java.lang.String)
09:36:53.573 [main] DEBUG org.apache.velocity.rendering - Adding public int java.lang.String.indexOf(int,int)
09:36:53.573 [main] DEBUG org.apache.velocity.rendering - Adding public int java.lang.String.indexOf(int)
09:36:53.573 [main] DEBUG org.apache.velocity.rendering - Adding public static java.lang.String java.lang.String.valueOf(int)
09:36:53.573 [main] DEBUG org.apache.velocity.rendering - Adding public static java.lang.String java.lang.String.valueOf(long)
09:36:53.573 [main] DEBUG org.apache.velocity.rendering - Adding public static java.lang.String java.lang.String.valueOf(float)
09:36:53.573 [main] DEBUG org.apache.velocity.rendering - Adding public static java.lang.String java.lang.String.valueOf(boolean)
09:36:53.573 [main] DEBUG org.apache.velocity.rendering - Adding public static java.lang.String java.lang.String.valueOf(char[])
09:36:53.573 [main] DEBUG org.apache.velocity.rendering - Adding public static java.lang.String java.lang.String.valueOf(char[],int,int)
09:36:53.573 [main] DEBUG org.apache.velocity.rendering - Adding public static java.lang.String java.lang.String.valueOf(java.lang.Object)
09:36:53.573 [main] DEBUG org.apache.velocity.rendering - Adding public static java.lang.String java.lang.String.valueOf(char)
09:36:53.573 [main] DEBUG org.apache.velocity.rendering - Adding public static java.lang.String java.lang.String.valueOf(double)
09:36:53.573 [main] DEBUG org.apache.velocity.rendering - Adding public char java.lang.String.charAt(int)
09:36:53.573 [main] DEBUG org.apache.velocity.rendering - Adding public int java.lang.String.codePointAt(int)
09:36:53.573 [main] DEBUG org.apache.velocity.rendering - Adding public int java.lang.String.codePointBefore(int)
09:36:53.573 [main] DEBUG org.apache.velocity.rendering - Adding public int java.lang.String.codePointCount(int,int)
09:36:53.574 [main] DEBUG org.apache.velocity.rendering - Adding public int java.lang.String.compareToIgnoreCase(java.lang.String)
09:36:53.574 [main] DEBUG org.apache.velocity.rendering - Adding public java.lang.String java.lang.String.concat(java.lang.String)
09:36:53.574 [main] DEBUG org.apache.velocity.rendering - Adding public boolean java.lang.String.contains(java.lang.CharSequence)
09:36:53.574 [main] DEBUG org.apache.velocity.rendering - Adding public boolean java.lang.String.contentEquals(java.lang.CharSequence)
09:36:53.574 [main] DEBUG org.apache.velocity.rendering - Adding public boolean java.lang.String.contentEquals(java.lang.StringBuffer)
09:36:53.574 [main] DEBUG org.apache.velocity.rendering - Adding public static java.lang.String java.lang.String.copyValueOf(char[])
09:36:53.574 [main] DEBUG org.apache.velocity.rendering - Adding public static java.lang.String java.lang.String.copyValueOf(char[],int,int)
09:36:53.574 [main] DEBUG org.apache.velocity.rendering - Adding public boolean java.lang.String.endsWith(java.lang.String)
09:36:53.574 [main] DEBUG org.apache.velocity.rendering - Adding public boolean java.lang.String.equalsIgnoreCase(java.lang.String)
09:36:53.578 [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[])
09:36:53.578 [main] DEBUG org.apache.velocity.rendering - Adding public static java.lang.String java.lang.String.format(java.lang.String,java.lang.Object[])
09:36:53.578 [main] DEBUG org.apache.velocity.rendering - Adding public void java.lang.String.getBytes(int,int,byte[],int)
09:36:53.578 [main] DEBUG org.apache.velocity.rendering - Adding public byte[] java.lang.String.getBytes(java.nio.charset.Charset)
09:36:53.578 [main] DEBUG org.apache.velocity.rendering - Adding public byte[] java.lang.String.getBytes(java.lang.String) throws java.io.UnsupportedEncodingException
09:36:53.579 [main] DEBUG org.apache.velocity.rendering - Adding public byte[] java.lang.String.getBytes()
09:36:53.579 [main] DEBUG org.apache.velocity.rendering - Adding public void java.lang.String.getChars(int,int,char[],int)
09:36:53.579 [main] DEBUG org.apache.velocity.rendering - Adding public native java.lang.String java.lang.String.intern()
09:36:53.579 [main] DEBUG org.apache.velocity.rendering - Adding public boolean java.lang.String.isEmpty()
09:36:53.579 [main] DEBUG org.apache.velocity.rendering - Adding public static java.lang.String java.lang.String.join(java.lang.CharSequence,java.lang.CharSequence[])
09:36:53.579 [main] DEBUG org.apache.velocity.rendering - Adding public static java.lang.String java.lang.String.join(java.lang.CharSequence,java.lang.Iterable)
09:36:53.579 [main] DEBUG org.apache.velocity.rendering - Adding public int java.lang.String.lastIndexOf(int)
09:36:53.579 [main] DEBUG org.apache.velocity.rendering - Adding public int java.lang.String.lastIndexOf(java.lang.String)
09:36:53.579 [main] DEBUG org.apache.velocity.rendering - Adding public int java.lang.String.lastIndexOf(java.lang.String,int)
09:36:53.579 [main] DEBUG org.apache.velocity.rendering - Adding public int java.lang.String.lastIndexOf(int,int)
09:36:53.579 [main] DEBUG org.apache.velocity.rendering - Adding public int java.lang.String.length()
09:36:53.579 [main] DEBUG org.apache.velocity.rendering - Adding public boolean java.lang.String.matches(java.lang.String)
09:36:53.579 [main] DEBUG org.apache.velocity.rendering - Adding public int java.lang.String.offsetByCodePoints(int,int)
09:36:53.579 [main] DEBUG org.apache.velocity.rendering - Adding public boolean java.lang.String.regionMatches(int,java.lang.String,int,int)
09:36:53.579 [main] DEBUG org.apache.velocity.rendering - Adding public boolean java.lang.String.regionMatches(boolean,int,java.lang.String,int,int)
09:36:53.579 [main] DEBUG org.apache.velocity.rendering - Adding public java.lang.String java.lang.String.replace(char,char)
09:36:53.579 [main] DEBUG org.apache.velocity.rendering - Adding public java.lang.String java.lang.String.replace(java.lang.CharSequence,java.lang.CharSequence)
09:36:53.579 [main] DEBUG org.apache.velocity.rendering - Adding public java.lang.String java.lang.String.replaceAll(java.lang.String,java.lang.String)
09:36:53.579 [main] DEBUG org.apache.velocity.rendering - Adding public java.lang.String java.lang.String.replaceFirst(java.lang.String,java.lang.String)
09:36:53.580 [main] DEBUG org.apache.velocity.rendering - Adding public java.lang.String[] java.lang.String.split(java.lang.String)
09:36:53.580 [main] DEBUG org.apache.velocity.rendering - Adding public java.lang.String[] java.lang.String.split(java.lang.String,int)
09:36:53.580 [main] DEBUG org.apache.velocity.rendering - Adding public boolean java.lang.String.startsWith(java.lang.String,int)
09:36:53.580 [main] DEBUG org.apache.velocity.rendering - Adding public boolean java.lang.String.startsWith(java.lang.String)
09:36:53.580 [main] DEBUG org.apache.velocity.rendering - Adding public java.lang.CharSequence java.lang.String.subSequence(int,int)
09:36:53.580 [main] DEBUG org.apache.velocity.rendering - Adding public java.lang.String java.lang.String.substring(int)
09:36:53.580 [main] DEBUG org.apache.velocity.rendering - Adding public java.lang.String java.lang.String.substring(int,int)
09:36:53.587 [main] DEBUG org.apache.velocity.rendering - Adding public char[] java.lang.String.toCharArray()
09:36:53.589 [main] DEBUG org.apache.velocity.rendering - Adding public java.lang.String java.lang.String.toLowerCase(java.util.Locale)
09:36:53.589 [main] DEBUG org.apache.velocity.rendering - Adding public java.lang.String java.lang.String.toLowerCase()
09:36:53.590 [main] DEBUG org.apache.velocity.rendering - Adding public java.lang.String java.lang.String.toUpperCase()
09:36:53.590 [main] DEBUG org.apache.velocity.rendering - Adding public java.lang.String java.lang.String.toUpperCase(java.util.Locale)
09:36:53.590 [main] DEBUG org.apache.velocity.rendering - Adding public java.lang.String java.lang.String.trim()
09:36:53.590 [main] DEBUG org.apache.velocity.rendering - Reflecting interface java.io.Serializable
09:36:53.590 [main] DEBUG org.apache.velocity.rendering - Reflecting interface java.lang.Comparable
09:36:53.591 [main] DEBUG org.apache.velocity.rendering - Reflecting interface java.lang.CharSequence
09:36:53.593 [main] DEBUG org.apache.velocity.rendering - Adding public default java.util.stream.IntStream java.lang.CharSequence.chars()
09:36:53.593 [main] DEBUG org.apache.velocity.rendering - Adding public default java.util.stream.IntStream java.lang.CharSequence.codePoints()
09:36:53.593 [main] DEBUG org.apache.velocity.rendering - Reflecting class java.lang.Object
09:36:53.593 [main] DEBUG org.apache.velocity.rendering - Adding public final void java.lang.Object.wait() throws java.lang.InterruptedException
09:36:53.593 [main] DEBUG org.apache.velocity.rendering - Adding public final void java.lang.Object.wait(long,int) throws java.lang.InterruptedException
09:36:53.593 [main] DEBUG org.apache.velocity.rendering - Adding public final native void java.lang.Object.wait(long) throws java.lang.InterruptedException
09:36:53.595 [main] DEBUG org.apache.velocity.rendering - Adding public final native java.lang.Class java.lang.Object.getClass()
09:36:53.595 [main] DEBUG org.apache.velocity.rendering - Adding public final native void java.lang.Object.notify()
09:36:53.595 [main] DEBUG org.apache.velocity.rendering - Adding public final native void java.lang.Object.notifyAll()
09:36:53.595 [main] DEBUG org.apache.velocity.rendering - =================================================================
09:36:53.605 [main] DEBUG com.baomidou.mybatisplus.generator.engine.AbstractTemplateEngine - 模板:/templates/entity.java.vm;  文件:E://work//mybatisnew//src//main//java//\com\wang\mybatisnew\user\domain\OrderInfo.java
09:36:53.608 [main] DEBUG org.apache.velocity.loader - ResourceManager: found /templates/mapper.java.vm with loader org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader
09:36:53.612 [main] DEBUG com.baomidou.mybatisplus.generator.engine.AbstractTemplateEngine - 模板:/templates/mapper.java.vm;  文件:E://work//mybatisnew//src//main//java//\com\wang\mybatisnew\user\mapper\OrderInfoDao.java
09:36:53.620 [main] DEBUG org.apache.velocity.loader - ResourceManager: found /templates/mapper.xml.vm with loader org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader
09:36:53.622 [main] DEBUG com.baomidou.mybatisplus.generator.engine.AbstractTemplateEngine - 模板:/templates/mapper.xml.vm;  文件:E://work//mybatisnew//src//main//java//\com\wang\mybatisnew\user\mapper\xml\OrderInfoMapper.xml
09:36:53.625 [main] DEBUG org.apache.velocity.loader - ResourceManager: found /templates/service.java.vm with loader org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader
09:36:53.628 [main] DEBUG com.baomidou.mybatisplus.generator.engine.AbstractTemplateEngine - 模板:/templates/service.java.vm;  文件:E://work//mybatisnew//src//main//java//\com\wang\mybatisnew\user\service\MPOrderInfoService.java
09:36:53.632 [main] DEBUG org.apache.velocity.loader - ResourceManager: found /templates/serviceImpl.java.vm with loader org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader
09:36:53.634 [main] DEBUG com.baomidou.mybatisplus.generator.engine.AbstractTemplateEngine - 模板:/templates/serviceImpl.java.vm;  文件:E://work//mybatisnew//src//main//java//\com\wang\mybatisnew\user\service\impl\OrderInfoServiceImpl.java
09:36:53.640 [main] DEBUG org.apache.velocity.loader - ResourceManager: found /templates/controller.java.vm with loader org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader
09:36:53.642 [main] DEBUG com.baomidou.mybatisplus.generator.engine.AbstractTemplateEngine - 模板:/templates/controller.java.vm;  文件:E://work//mybatisnew//src//main//java//\com\wang\mybatisnew\user\controller\OrderInfoController.java
09:36:53.685 [main] DEBUG org.apache.velocity.loader - ResourceManager: found /templates/entity.java.vm with loader org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader
09:36:53.692 [main] DEBUG com.baomidou.mybatisplus.generator.engine.AbstractTemplateEngine - 模板:/templates/entity.java.vm;  文件:E://work//mybatisnew//src//main//java//\com\wang\mybatisnew\user\domain\User.java
09:36:53.696 [main] DEBUG org.apache.velocity.loader - ResourceManager: found /templates/mapper.java.vm with loader org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader
09:36:53.699 [main] DEBUG com.baomidou.mybatisplus.generator.engine.AbstractTemplateEngine - 模板:/templates/mapper.java.vm;  文件:E://work//mybatisnew//src//main//java//\com\wang\mybatisnew\user\mapper\UserDao.java
09:36:53.710 [main] DEBUG org.apache.velocity.loader - ResourceManager: found /templates/mapper.xml.vm with loader org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader
09:36:53.721 [main] DEBUG com.baomidou.mybatisplus.generator.engine.AbstractTemplateEngine - 模板:/templates/mapper.xml.vm;  文件:E://work//mybatisnew//src//main//java//\com\wang\mybatisnew\user\mapper\xml\UserMapper.xml
09:36:53.724 [main] DEBUG org.apache.velocity.loader - ResourceManager: found /templates/service.java.vm with loader org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader
09:36:53.726 [main] DEBUG com.baomidou.mybatisplus.generator.engine.AbstractTemplateEngine - 模板:/templates/service.java.vm;  文件:E://work//mybatisnew//src//main//java//\com\wang\mybatisnew\user\service\MPUserService.java
09:36:53.735 [main] DEBUG org.apache.velocity.loader - ResourceManager: found /templates/serviceImpl.java.vm with loader org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader
09:36:53.745 [main] DEBUG com.baomidou.mybatisplus.generator.engine.AbstractTemplateEngine - 模板:/templates/serviceImpl.java.vm;  文件:E://work//mybatisnew//src//main//java//\com\wang\mybatisnew\user\service\impl\UserServiceImpl.java
09:36:53.757 [main] DEBUG org.apache.velocity.loader - ResourceManager: found /templates/controller.java.vm with loader org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader
09:36:53.762 [main] DEBUG com.baomidou.mybatisplus.generator.engine.AbstractTemplateEngine - 模板:/templates/controller.java.vm;  文件:E://work//mybatisnew//src//main//java//\com\wang\mybatisnew\user\controller\UserController.java
09:36:53.997 [main] DEBUG com.baomidou.mybatisplus.generator.AutoGenerator - ==========================文件生成完成!!!==========================

Process finished with exit code 0

 

CURD测试

controller

package com.wang.mybatisnew.user.controller;


import com.wang.mybatisnew.user.domain.User;
import com.wang.mybatisnew.user.service.MPUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;

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

/**
 * <p>
 * 前端控制器
 * </p>
 *
 * @author wly
 * @since 2018-07-04
 */
@RestController
@RequestMapping("/user")
public class UserController {

    @Autowired
    private MPUserService userService;

    @RequestMapping("/test")
    public String test() {
        //
        User user = new User();
        user.setUserName("张三");
        user.setUserSex(0);
        user.setUserAddress("北美K2");
        userService.insert(user);
        //
        System.out.println( userService.selectById(user.getId()));
        //
        user.setUserAddress("北美K3");
        //
        System.out.println( userService.selectById(user.getId()));
        //
        userService.deleteById(user.getId());
        //
        System.out.println( userService.selectById(user.getId()));
        return "done";
    }
}

 

控制台

User{id=5, userName=张三, userSex=0, userAddress=北美K2}
User{id=5, userName=张三, userSex=0, userAddress=北美K2}
null

 

我的代码:https://gitee.com/wlyfree/mybatisnew

PS:这里面有些细节性的问题,如:表名->类名、字段名:下划线转驼峰,公共的superService、superDao的自定义等等都是可以实现的。需要自定对着官方文档研究。

posted @ 2018-07-05 09:56  鱼我所欲也  阅读(14156)  评论(0编辑  收藏  举报