/**
* 读取配置文件:根据key 获取对应的value
*/
public class ConfigReader {
public ConfigReader(){}
private static Properties props = new Properties();
//common.properties
public static String getUrl(String fileName, String key) {
try {
/**
* 下面三个都可以获得类加载器
* System.out.println(Thread.currentThread().getContextClassLoader()); // 当前线程的类加载器
* System.out.println(Test.class.getClassLoader()); // 当前类的类加载器
* System.out.println(ClassLoader.getSystemClassLoader()); // 系统初始的类加载器
* 在代码中动态加载jar、资源文件的时候,首先应该是使用Thread.currentThread().getContextClassLoader()。
* ClassHelper.class.g