あなたは、いくつかの揮発性の構成パラメータが必要
に置かれた後、XML設定ファイルや設定ファイルのプロパティ。
[この方法でのみ、設定ファイルのクラスパスを読み取ることができます]:ベースClassLoderは、設定ファイルを読み込みます
Properties properties = new Properties();
// 使用ClassLoader加载properties配置文件生成对应的输入流
InputStream in = PropertiesMain.class.getClassLoader().getResourceAsStream("config/config.properties");
// 使用properties对象加载输入流
properties.load(in);
//获取key对应的value值
properties.getProperty(String key);