创建一个类
import cn.hutool.setting.dialect.Props;
/**
* 键值常量
*/
public class DockSysConst {
//引入properties文件
private static final Props props = new Props("conf/dock-sys.properties");
//properties里面的值
public static final String CMID=props.getProperty("CMID");
public static final String CMNAME=props.getProperty("CMNAME");
}
dock-sys.properties文件