public class PropsUtil extends Object
| Constructor and Description |
|---|
PropsUtil() |
| Modifier and Type | Method and Description |
|---|---|
static Props |
get(String name)
获取当前环境下的配置文件
name可以为不包括扩展名的文件名(默认.properties),也可以是文件名全称 |
static Props |
getFirstFound(String... names)
获取给定路径找到的第一个配置文件
* name可以为不包括扩展名的文件名(默认.properties为结尾),也可以是文件名全称 |
static Props |
getSystemProps()
获取系统参数,例如用户在执行java命令时定义的 -Duse=hutool
|
public static Props get(String name)
name - 文件名,如果没有扩展名,默认为.propertiespublic static Props getFirstFound(String... names)
names - 文件名,如果没有扩展名,默认为.propertiespublic static Props getSystemProps()
Copyright © 2025. All rights reserved.