mirror of
https://gitee.com/BDWare/front-base
synced 2025-01-09 17:34:01 +00:00
feat: make CMDConf to write pretty json into file
make CMDConf.write to write pretty json into cmconfig.json
This commit is contained in:
parent
c8cf9cca58
commit
c5fc2dc54e
@ -3,6 +3,7 @@ package org.bdware.server;
|
||||
import com.google.gson.Gson;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.bdware.sc.util.JsonUtil;
|
||||
|
||||
import java.io.*;
|
||||
import java.lang.reflect.Field;
|
||||
@ -101,7 +102,7 @@ public class CMDConf {
|
||||
try {
|
||||
this.overwrite = false;
|
||||
BufferedWriter bw = new BufferedWriter(new FileWriter(path));
|
||||
bw.write(new Gson().toJson(this));
|
||||
bw.write(JsonUtil.toPrettyJson(this));
|
||||
bw.flush();
|
||||
bw.close();
|
||||
LOGGER.info("write new configure");
|
||||
|
Loading…
Reference in New Issue
Block a user