Browse Source

REPORT-126723 新建的服务器数据集设计器重启后丢失

mss/2.0
Destiny.Lin 6 months ago
parent
commit
7c9cf9a022
  1. 7
      designer-realize/src/main/java/com/fanruan/boot/ConfigHelper.java

7
designer-realize/src/main/java/com/fanruan/boot/ConfigHelper.java

@ -7,8 +7,9 @@ import com.fr.log.FineLoggerFactory;
import com.fr.stable.StringUtils; import com.fr.stable.StringUtils;
import java.io.BufferedReader;
import java.io.File; import java.io.File;
import java.io.InputStream; import java.io.FileReader;
import java.util.Properties; import java.util.Properties;
/** /**
@ -92,9 +93,7 @@ public class ConfigHelper {
if (!ResourceIOUtils.exist(path)) { if (!ResourceIOUtils.exist(path)) {
ResourceIOUtils.createFile(path); ResourceIOUtils.createFile(path);
} }
try (InputStream is = ResourceIOUtils.read(path)){ properties.load(new BufferedReader(new FileReader(path)));
properties.load(is);
}
} catch (Exception e) { } catch (Exception e) {
FineLoggerFactory.getLogger().error(e, e.getMessage()); FineLoggerFactory.getLogger().error(e, e.getMessage());
} }

Loading…
Cancel
Save