Mybatis 基础代码生成器 ITTREE-Mybatis

码农软件 · 软件分类 · 代码生成工具 · 2019-03-05 22:14:53

软件介绍

Mybatis基础代码生成器

通过Mybatis-generator生成mybatis所需要使用的基础代码。

如何使用

修改配置文件

jdbc.driverClass=com.mysql.jdbc.Driver
#数据库链接地址
jdbc.connectionURL=jdbc:mysql://127.0.0.1:3306/test
#数据库账户名
jdbc.userId=root
#数据库密码
jdbc.password=root
#代码生成目录
targetProject=D:/workspace/java/mybatis-generator/src/main/java
#Java实体生成目录
javaModel.targetPackage=club.ittree.model
#SqlMap生成目录
sqlMap.targetPackage=club.ittree.mapper
#SqlMap对应的xml文件目录
javaClient.targetPackage=club.ittree.mapper

执行代码生成main方法

public class MybatisGeneratorRun {

    public static void main(String[] args) throws Exception {
        MybatisGeneratorRun mybatisGeneratorRun = new MybatisGeneratorRun();
        mybatisGeneratorRun.test();
    }

    public void test() throws Exception {
        List<String> warnings = new ArrayList<String>();
        boolean overwrite = true;
        File configFile = new File(Surrogate.Generator.class.getResource("/test/test.xml").getPath());
        ConfigurationParser cp = new ConfigurationParser(warnings);
        org.mybatis.generator.config.Configuration config = cp.parseConfiguration(configFile);
        DefaultShellCallback callback = new DefaultShellCallback(overwrite);
        MyBatisGenerator myBatisGenerator = new MyBatisGenerator(config, callback, warnings);
        myBatisGenerator.generate(null);
    }

}

本文地址:https://codercto.com/soft/d/714.html

PHP and MySQL for Dynamic Web Sites : Visual QuickPro Guide

PHP and MySQL for Dynamic Web Sites : Visual QuickPro Guide

Larry Ullman / Peachpit Press / 2005 / USD 39.99

It hasn't taken Web developers long to discover that when it comes to creating dynamic, database-driven Web sites, MySQL and PHP provide a winning open source combination. Add this book to the mix, an......一起来看看 《PHP and MySQL for Dynamic Web Sites : Visual QuickPro Guide》 这本书的介绍吧!

RGB转16进制工具
RGB转16进制工具

RGB HEX 互转工具

在线进制转换器
在线进制转换器

各进制数互转换器

html转js在线工具
html转js在线工具

html转js在线工具