Commit 2e2882b0d5eac381b101177e7381b91636d0fd2f
1 parent
bc827ef3
代码生成防止缓存内的数据没有及时写入到zip文件
Showing
1 changed file
with
1 additions
and
0 deletions
ruoyi/src/main/java/com/ruoyi/project/tool/gen/service/GenTableServiceImpl.java
| @@ -262,6 +262,7 @@ public class GenTableServiceImpl implements IGenTableService | @@ -262,6 +262,7 @@ public class GenTableServiceImpl implements IGenTableService | ||
| 262 | zip.putNextEntry(new ZipEntry(VelocityUtils.getFileName(template, table))); | 262 | zip.putNextEntry(new ZipEntry(VelocityUtils.getFileName(template, table))); |
| 263 | IOUtils.write(sw.toString(), zip, Constants.UTF8); | 263 | IOUtils.write(sw.toString(), zip, Constants.UTF8); |
| 264 | IOUtils.closeQuietly(sw); | 264 | IOUtils.closeQuietly(sw); |
| 265 | + zip.flush(); | ||
| 265 | zip.closeEntry(); | 266 | zip.closeEntry(); |
| 266 | } | 267 | } |
| 267 | catch (IOException e) | 268 | catch (IOException e) |