mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-05-09 23:51:34 +08:00
add create
This commit is contained in:
parent
5a73a17f4d
commit
fd5f43b5b1
@ -21,6 +21,7 @@
|
|||||||
* 【core 】 改进ObjectUtil.equal,支持BigDecimal判断
|
* 【core 】 改进ObjectUtil.equal,支持BigDecimal判断
|
||||||
* 【core 】 ArrayConverter增加可选是否忽略错误(issue#I1VNYQ@Gitee)
|
* 【core 】 ArrayConverter增加可选是否忽略错误(issue#I1VNYQ@Gitee)
|
||||||
* 【db 】 增加ConditionBuilder
|
* 【db 】 增加ConditionBuilder
|
||||||
|
* 【setting】 Setting和Props增加create方法
|
||||||
|
|
||||||
### Bug修复
|
### Bug修复
|
||||||
* 【core 】 修复Dict.of错误(issue#I1UUO5@Gitee)
|
* 【core 】 修复Dict.of错误(issue#I1UUO5@Gitee)
|
||||||
|
@ -51,11 +51,21 @@ public class Setting extends AbsSetting implements Map<String, String> {
|
|||||||
/**
|
/**
|
||||||
* 默认字符集
|
* 默认字符集
|
||||||
*/
|
*/
|
||||||
public final static Charset DEFAULT_CHARSET = CharsetUtil.CHARSET_UTF_8;
|
public static final Charset DEFAULT_CHARSET = CharsetUtil.CHARSET_UTF_8;
|
||||||
/**
|
/**
|
||||||
* 默认配置文件扩展名
|
* 默认配置文件扩展名
|
||||||
*/
|
*/
|
||||||
public final static String EXT_NAME = "setting";
|
public static final String EXT_NAME = "setting";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 构建一个空的Setting,用于手动加入参数
|
||||||
|
*
|
||||||
|
* @return Setting
|
||||||
|
* @since 5.4.3
|
||||||
|
*/
|
||||||
|
public static Setting create() {
|
||||||
|
return new Setting();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 附带分组的键值对存储
|
* 附带分组的键值对存储
|
||||||
|
@ -21,6 +21,7 @@ import cn.hutool.core.util.CharsetUtil;
|
|||||||
import cn.hutool.core.util.ReflectUtil;
|
import cn.hutool.core.util.ReflectUtil;
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
import cn.hutool.log.StaticLog;
|
import cn.hutool.log.StaticLog;
|
||||||
|
import cn.hutool.setting.Setting;
|
||||||
import cn.hutool.setting.SettingRuntimeException;
|
import cn.hutool.setting.SettingRuntimeException;
|
||||||
|
|
||||||
import java.io.BufferedReader;
|
import java.io.BufferedReader;
|
||||||
@ -50,6 +51,16 @@ public final class Props extends Properties implements BasicTypeGetter<String>,
|
|||||||
*/
|
*/
|
||||||
public final static String EXT_NAME = "properties";
|
public final static String EXT_NAME = "properties";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 构建一个空的Props,用于手动加入参数
|
||||||
|
*
|
||||||
|
* @return Setting
|
||||||
|
* @since 5.4.3
|
||||||
|
*/
|
||||||
|
public static Props create() {
|
||||||
|
return new Props();
|
||||||
|
}
|
||||||
|
|
||||||
// ----------------------------------------------------------------------- 私有属性 start
|
// ----------------------------------------------------------------------- 私有属性 start
|
||||||
/** 属性文件的URL */
|
/** 属性文件的URL */
|
||||||
private URL propertiesFileUrl;
|
private URL propertiesFileUrl;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user