读取properties配置文件
package com.easycrud.utils;
import java.io.IOException;
import java.io.InputStream;
import java.util.Iterator;
import java.util.Map;
import java.util.Properties;
import java.util.concurrent.ConcurrentHashMap;
/**
* @BelongsProject: EasyCrud
* @BelongsPackage: com.easycrud.utils
* @Author: xpx
* @Email: 2436846019@qq.com
* @CreateTime: 2023-05-02 16:05
* @Description: 读取properties配置文件工具类
* @Version: 1.0
*/
public class PropertiesUtils {
private static Properties props = new Properties();
private static Map<String,String> PROPER_MAP = new ConcurrentHashMap<String, String>();
/**
* 项目初始化时就去读取配置文件
*/
static {
InputStream is = null;
try{
is = PropertiesUtils.class.getClassLoader().getResourceAsStream("application.properties");
props.load(is);
Iterator<Object> iterator