package com.sencorsta.rabs.config;

import cn.hutool.core.io.FileUtil;
import cn.hutool.setting.Setting;

/**
 * @author daibin
 */
public class ConfigReader {
	/**
	 * 配置文件所在目录
	 */
	public static final String CONF_PATH = System.getProperty("user.dir") + "/conf/";
	/**
	 * 配置文件名
	 */
	private static final String FILE_NAME = "config.properties";

	public static Setting readConfig() {
		String filePath = CONF_PATH + FILE_NAME;
		if (!FileUtil.exist(filePath)) {
			FileUtil.touch(filePath);
		}
		return new Setting(filePath);
	}
}
