src/main/java/com/example/config/ConfigValue.java
@@ -51,4 +51,20 @@ public String getConfigValue(String key) { return configMap.get(key); } public void refresh(){ HashMap<String, String> hashMap = new HashMap<>(); Properties props = new Properties(); FileInputStream fis = null; try { fis = new FileInputStream(CONFIG_PATH); props.load(fis); fis.close(); for (String key : props.stringPropertyNames()) { hashMap.put(key, props.getProperty(key)); } configMap = hashMap; } catch (IOException ignored) { } } }