We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
一般在建表的时候都会加上前缀 t_ ,针对这个问题应该怎么解决。
The text was updated successfully, but these errors were encountered:
add > new feature for issue #32
e800911
@anchuang HI,最近比较忙,没来的及答复,不好意思。这个问题刚才我已经解决,并加到CodeGenerator上了,可以自己指定 Model 的名称了,请更新代码。
CodeGenerator
public static void main(String[] args) { genCode("输入表名","输入自定义Model名称"); } /** * 通过数据表名称,和自定义的 Model 名称生成代码 * 如输入表名称 "t_user_detail" 和自定义的 Model 名称 "User" 将生成 User、UserMapper、UserService ... * @param tableName 数据表名称 * @param modelName 自定义的 Model 名称 */ public static void genCode(String tableName, String modelName) { genModelAndMapper(tableName, modelName); genService(tableName, modelName); genController(tableName, modelName); }
Sorry, something went wrong.
谢谢,测试了下,这个问题已经得到了解决。能否把生成mapper.xml和生成model的模板也放在template目录下下,这样方便根据本身的项目需要修改。
@anchuang HI,Model 和 Mapper 是用 MyBatis Generator 生成的,相关配置可以查看官方文档:http://www.mybatis.org/generator/
收到,谢谢
lihengming
No branches or pull requests
一般在建表的时候都会加上前缀 t_ ,针对这个问题应该怎么解决。
The text was updated successfully, but these errors were encountered: