Package com.xiaoleilu.hutool

Examples of com.xiaoleilu.hutool.Setting.reload()


    //有时候需要在key对应value不存在的时候(没有这项设置的时候)告知用户,故有此方法打印一个debug日志
    setting.getWithLog("name");
    setting.getWithLog("name", "group1");
   
    //重新读取配置文件,可以启用一个定时器调用此方法来定时更新配置
    setting.reload();
   
    //当通过代码加入新的键值对的时候,调用store会保存到文件,但是会覆盖原来的文件,并丢失注释
    setting.setSetting("name1", "value");
    setting.store("/home/looly/XXX.setting");
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.