代码自动生成器 AutoCreate

码农软件 · 软件分类 · 常用工具包 · 2019-08-15 07:29:26

软件介绍

autocreate 是 数据库链接采用Jfinal ActiveRecordPlugin,模板配置采用beetl,实现根据模板自动生成项目代码。

可以根据自己项目代码结构,定制属于自己的模板,甚至可以通过备注配置,实现select,radio,date等组件生成;模板配置完成,再也不用写那些重复的代码了。

  • 默认模板目录:/autopath/template/project/

  • 自带三套模板beetl(生成beetl文件)、jsp(生成jsp文件)、jflyfox(生成本人jflyfox个人博客项目文件)

  • 默认自动生成输出目录:/autopath/output/

  • 启动文件:com.flyfox.client.AutoCreateClient

  • 生成表需要有表注释和字段注释。(写注释也是个好习惯哦)

配置说明:

  • src/main/java/conf/db.properties 配置链接的数据库信息

  • src/main/java/conf/template.properties 配置使用模板,生成路径和生成那些表

  • template.selected参数 制定下面已经存在的模板key

  • template.tables参数 设定生成那些表;不填和all会生成数据库所有表;多个表明用逗号分隔

  • src/main/java/conf/config.properties 配置beetl模板参数

示例说明:

本人的博客http://www.oschina.net/p/jflyfox和内容管理http://www.oschina.net/p/mtgxxw项目,都是使用的这个代码生成器。

1.数据库表如下:

2.修改配置

首先,配置数据库信息db.properties

然后,配置表名和模板template.properties

#选择模板路径
template.selected=template.path.jflyfox
#all或者不填,为生成全部;多个表已逗号分隔
template.tables=sys_dict,sys_dict_detail

3.运行AutoCreateClient文件,运行日志如下

4.然后,会在autopath/output目录下生产对应的文件:

5.列表代码片段如下:

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

Algorithms in C (Computer Science Series)

Algorithms in C (Computer Science Series)

Robert Sedgewick / Addison-Wesley Professional / 1990-01-11 / USD 59.99

This new version of the best-selling book, Algorithms, SecondEdition, provides a comprehensive collection of algorithmsimplemented in C. A variety of algorithms are described in eachofthe following ar......一起来看看 《Algorithms in C (Computer Science Series)》 这本书的介绍吧!

RGB CMYK 转换工具
RGB CMYK 转换工具

RGB CMYK 互转工具

HEX CMYK 转换工具
HEX CMYK 转换工具

HEX CMYK 互转工具

HSV CMYK 转换工具
HSV CMYK 转换工具

HSV CMYK互换工具