Tool description:
1, the rear end of this tool java web CRUD interfaces based code generation, including the controller layer, service layer, DAO layer entity class, mybatis xml code.
2, this tool is based on mybatis generator 1.3.6, modify the source code for my great heavenly habit of optimization for a moment;
2, this tool draws god zouzg code, https: //github.com/zouzg/mybatis-generator-gui; expanded on the basis of the controller layer, service layer, Dao layer code generation function;
3, the tool FreeMarker, can modify the template itself, generation controller, service-level code and the like;
download link:
Old version: https://download.csdn.net/download/weixin_42686388/10792718
v1.0.0 version: https://download.csdn.net/download/weixin_42686388/11140704
V1.0.0 version:
This upgrade, according to convention over configuration idea, several major modifications following points:
1, add optimistic locking version control ; adding the schedule data table version field of type int and set the default value is 0;
They were treated insert, update sql function; if the field is not present, then no treatment ;
2, add del_flag logical deletion flag ; del_flag schedule data table to add a field of type int and set the default value is 0; delete 0 Normal 1
Were treated query, insert, update, delete function sql
If the field does not exist, no processing ;
3, processing create_time, record creation time ;
Conventions Data Sheet add create_time field, timestamp type, and only create assignments, no update operation
They were treated insert, update function sql
mysql, pgsql lower value now (), another database is # {createTime, jdbcType = TIMESTAMP}
If the field does not exist, no processing ;
4, the processing UPDATE_TIME, record update time ; predetermined add the field data tables, timestamp type, and the default value is the current value of the database
mysql, pgsql lower value now (), another database is # {updateTime, jdbcType = TIMESTAMP}
If the field does not exist, no processing ;
Specific use of the tool, refer to the blog post: https://blog.csdn.net/weixin_42686388/article/details/84203062
5, a version of the repair part of the bug
In a known tool change MAC, controller, service level code generates an exception
Under Linux has not been tested, it is recommended to use the tool in windows