code: public static Properties fillProperties(String fileName, ClassLoader cl) {
  
          if (!fileName.endsWith(".properties")) {
              fileName = fileName + ".properties";
          }
  
          Properties properties = new Properties();
  
          if (filePropMapping.containsKey(fileName)) {
              properties = filePropMapping.get(fileName);
          } else {
              InputStream is = cl.getResourceAsStream(fileName);
              try {
                  properties.load(is);
                  filePropMapping.put(fileName, properties);
              } catch (Exception e) {
                  throw new RuntimeException("load properties file error "
                          + fileName, e);
              } finally {
                  try {
                      is.close();
                  } catch (IOException e) {
                      e.printStackTrace();
                  }
              }
          }
  
          return properties;
  
      }
docs: 将文件中配置信息填充到properties对象中(用指定的ClassLoader)
  
  @param fileName
  @param cl
  @return Properties对象
  @author liuzeyin