public class ResourceUtil
extends cn.hutool.core.io.resource.ResourceUtil
| 构造器和说明 |
|---|
ResourceUtil() |
| 限定符和类型 | 方法和说明 |
|---|---|
static String |
readJarFile(Class<?> clazz) |
static Map<String,Object> |
readJsonFile(String filePath)
读取项目中json配置文件内容
|
static Map<String,String> |
readProperties(String fileName)
读取项目中properties配置文件内容
|
static Map<String,Object> |
readYaml(String filePath)
读取yaml配置文件内容
|
public static Map<String,String> readProperties(String fileName) throws IOException
fileName - 文件名称IOException - IO异常public static String readJarFile(Class<?> clazz) throws IOException
IOExceptionpublic static Map<String,Object> readJsonFile(String filePath)
filePath - 文件路径Exception - IO异常public static Map<String,Object> readYaml(String filePath) throws FileNotFoundException
filePath - 文件路径Exception - IO异常FileNotFoundExceptionCopyright © 2022. All rights reserved.