You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
41 lines
1.1 KiB
41 lines
1.1 KiB
package com.fr.plugin.sso.utils; |
|
|
|
import com.fr.io.utils.ResourceIOUtils; |
|
|
|
import java.io.BufferedReader; |
|
import java.io.InputStream; |
|
import java.io.InputStreamReader; |
|
import java.util.Properties; |
|
import java.util.ResourceBundle; |
|
|
|
public class PropertiesUtils { |
|
// private static final String RESOURCES_PATH = "config"; |
|
// private static ResourceBundle bundle = null; |
|
// |
|
// static { |
|
// bundle = ResourceBundle.getBundle(RESOURCES_PATH); |
|
// } |
|
// |
|
// public static String getProperties(String key){ |
|
// return bundle.getString(key); |
|
// } |
|
|
|
/** |
|
* 获取web-info下的配置文件 |
|
* @param path |
|
* @return |
|
*/ |
|
public static Properties getProperties2(String path){ |
|
Properties p = new Properties(); |
|
|
|
try{ |
|
InputStream is = ResourceIOUtils.read("/resources/wz.properties"); |
|
BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(is)); |
|
p.load(bufferedReader); |
|
}catch(Exception e){ |
|
FRUtils.FRLogInfo("获取配置文件异常"); |
|
} |
|
|
|
return p; |
|
} |
|
}
|
|
|