Skip to content

Commit

Permalink
Merge branch 'master' of https://gitee.com/dbdu/eladmin into 2.5dev
Browse files Browse the repository at this point in the history
  • Loading branch information
elunez committed Feb 10, 2020
2 parents bc5187a + 68510e1 commit e453f2b
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,9 @@ public static List<Map<String, Object>> preview(List<ColumnInfo> columns, GenCon
}

public static String download(List<ColumnInfo> columns, GenConfig genConfig) throws IOException {
String tempPath =System.getProperty("java.io.tmpdir") + "eladmin-gen-temp" + File.separator + genConfig.getTableName() + File.separator;
// 拼接的路径:/tmpeladmin-gen-temp/,这个路径在Linux下需要root用户才有权限创建,非root用户会权限错误而失败,更改为: /tmp/eladmin-gen-temp/
// String tempPath =System.getProperty("java.io.tmpdir") + "eladmin-gen-temp" + File.separator + genConfig.getTableName() + File.separator;
String tempPath =System.getProperty("java.io.tmpdir") + File.separator + "eladmin-gen-temp" + File.separator + genConfig.getTableName() + File.separator;
Map<String,Object> genMap = getGenMap(columns, genConfig);
TemplateEngine engine = TemplateUtil.createEngine(new TemplateConfig("template", TemplateConfig.ResourceMode.CLASSPATH));
// 生成后端代码
Expand Down

0 comments on commit e453f2b

Please sign in to comment.