Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
Eladmin
Commits
e453f2b8
Commit
e453f2b8
authored
Feb 10, 2020
by
Elune
Browse files
Merge branch 'master' of
https://gitee.com/dbdu/eladmin
into 2.5dev
parents
bc5187a7
68510e1e
Changes
1
Show whitespace changes
Inline
Side-by-side
eladmin-generator/src/main/java/me/zhengjie/utils/GenUtil.java
View file @
e453f2b8
...
@@ -85,7 +85,9 @@ public class GenUtil {
...
@@ -85,7 +85,9 @@ public class GenUtil {
}
}
public
static
String
download
(
List
<
ColumnInfo
>
columns
,
GenConfig
genConfig
)
throws
IOException
{
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
);
Map
<
String
,
Object
>
genMap
=
getGenMap
(
columns
,
genConfig
);
TemplateEngine
engine
=
TemplateUtil
.
createEngine
(
new
TemplateConfig
(
"template"
,
TemplateConfig
.
ResourceMode
.
CLASSPATH
));
TemplateEngine
engine
=
TemplateUtil
.
createEngine
(
new
TemplateConfig
(
"template"
,
TemplateConfig
.
ResourceMode
.
CLASSPATH
));
// 生成后端代码
// 生成后端代码
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment