update 优化 使用 hutool 替换 ruoyi 自带工具类 解决部分方法过期与高版本JDK不兼容问题

This commit is contained in:
疯狂的狮子li
2021-06-12 20:13:35 +08:00
parent 97a0c890bf
commit b3541e9758
13 changed files with 418 additions and 1366 deletions

View File

@ -263,12 +263,8 @@ public class GenTableServiceImpl extends ServiceImpl<GenTableMapper, GenTable> i
StringWriter sw = new StringWriter();
Template tpl = Velocity.getTemplate(template, Constants.UTF8);
tpl.merge(context, sw);
try {
String path = getGenPath(table, template);
FileUtils.writeStringToFile(new File(path), sw.toString(), Constants.UTF8);
} catch (IOException e) {
throw new CustomException("渲染模板失败,表名:" + table.getTableName());
}
String path = getGenPath(table, template);
FileUtils.writeUtf8String(sw.toString(), path);
}
}
}