32 Unstar Star 74 Fork 34

杜福忠 / Enjoy代码生成器

Create your Gitee Account
Explore and code with more than 5 million developers,Free private repositories !:)
Sign up
Clone or download
Cancel
Notice: Creating folder will generate an empty file .keep, because not support in Git
Loading...
README.md

#Enjoy代码生成器 #Enjoy 谁用谁知道~ 运行流程: 1, 利用模版引擎 拼接 好字符串文本 2, 文本写入到代码那个文件夹下面 就可以了

结构介绍

测试生成一套~


public static void main(String[] args) {
        String className = "Test";
        String tableName = "t_test";

        JfGenerator.me
        .setSrcFolder("src/main/java")
        .setViewFolder("src/main/webapp")
        .setPackageBase("com")
        .setBasePath("demo")
        .tableSql(getSqlList())
        .javaRender(className, tableName)
        .htmlRender(className, tableName);

        System.out.println("---------OK-刷新一下项目吧---------");
    }
    
    private static List<String> getSqlList() {
        ArrayList<String> sqlList = new ArrayList<String>();
        
        sqlList.add("DROP TABLE IF EXISTS `t_test`;");
        sqlList.add("CREATE TABLE `t_test` ( " +
                "  `id` int(11) NOT NULL AUTO_INCREMENT, " +
                "  `test` varchar(255) DEFAULT NULL, " +
                "  PRIMARY KEY (`id`) " +
                ") ENGINE=InnoDB DEFAULT CHARSET=utf8;");
        
        return sqlList;
    }

Comments ( 10 )

Sign in for post a comment

About

谁用谁知道~ spread retract
Java
Apache-2.0
Cancel

Releases

No release

Contributors

All

Activities

load more
can not load any more
Java
1
https://gitee.com/bean80/tpp.git
git@gitee.com:bean80/tpp.git
bean80
tpp
Enjoy代码生成器
master

Search

132457 8cb2edc1 1899542 131848 70c8d3a4 1899542