use of com.ikoori.vip.server.core.template.engine.base.GunsTemplateEngine in project vip by guangdada.
the class TemplateGenerator method main.
public static void main(String[] args) throws IOException {
ContextConfig contextConfig = new ContextConfig();
contextConfig.setBizChName("啊哈");
contextConfig.setBizEnName("haha");
contextConfig.setModuleName("tk");
contextConfig.setProjectPath("D:\\tmp\\guns");
// contextConfig.setAddPageSwitch(false);
// contextConfig.setEditPageSwitch(false);
GunsTemplateEngine gunsTemplateEngine = new SimpleTemplateEngine();
gunsTemplateEngine.setContextConfig(contextConfig);
gunsTemplateEngine.start();
}
use of com.ikoori.vip.server.core.template.engine.base.GunsTemplateEngine in project vip by guangdada.
the class CodeController method add.
/**
* 代码生成
*/
@ApiOperation("生成代码")
@RequestMapping(value = "/generate", method = RequestMethod.POST)
@ResponseBody
@Permission(Const.ADMIN_NAME)
public Object add(@ApiParam(value = "模块名称", required = true) @RequestParam String moduleName, @RequestParam String bizChName, @RequestParam String bizEnName, @RequestParam String path) {
if (ToolUtil.isOneEmpty(bizChName, bizEnName)) {
throw new BussinessException(BizExceptionEnum.REQUEST_NULL);
}
ContextConfig contextConfig = new ContextConfig();
contextConfig.setBizChName(bizChName);
contextConfig.setBizEnName(bizEnName);
contextConfig.setModuleName(moduleName);
if (ToolUtil.isNotEmpty(path)) {
contextConfig.setProjectPath(path);
}
GunsTemplateEngine gunsTemplateEngine = new SimpleTemplateEngine();
gunsTemplateEngine.setContextConfig(contextConfig);
gunsTemplateEngine.start();
return super.SUCCESS_TIP;
}
Aggregations