Package | Description |
---|---|
cn.hutool.setting |
Setting模块主要针对Properties文件读写做封装,同时定义一套自己的配置文件规范,实现兼容性良好的配置工具。
|
cn.hutool.setting.dialect |
配置文件实现封装,例如Properties封装Props
|
Modifier and Type | Method and Description |
---|---|
Props |
Setting.getProps(String group)
获取group分组下所有配置键值对,组成新的
Props |
Modifier and Type | Method and Description |
---|---|
static Props |
Props.create()
构建一个空的Props,用于手动加入参数
|
static Props |
PropsUtil.get(String name)
获取当前环境下的配置文件
name可以为不包括扩展名的文件名(默认.properties),也可以是文件名全称 |
static Props |
PropsUtil.getFirstFound(String... names)
获取给定路径找到的第一个配置文件
* name可以为不包括扩展名的文件名(默认.properties为结尾),也可以是文件名全称 |
static Props |
Props.getProp(String resource)
获得Classpath下的Properties文件
|
static Props |
Props.getProp(String resource,
Charset charset)
获得Classpath下的Properties文件
|
static Props |
Props.getProp(String resource,
String charsetName)
获得Classpath下的Properties文件
|
static Props |
PropsUtil.getSystemProps()
获取系统参数,例如用户在执行java命令时定义的 -Duse=hutool
|
Copyright © 2025. All rights reserved.