在java类中获取配置文件内容

 InputStream in = UCClient.class.getClassLoader().getResourceAsStream(
            "config.properties");
    Properties properties = new Properties();
    try {
      properties.load(in);
      saveFilePath = properties.getProperty("saveFilePath");
    } catch (Exception e) {
      e.printStackTrace();
    }

你可能感兴趣的:(ssm)