public static String getProperty(String key){ InputStream in = PropertiesUtils.class.getResourceAsStream("/conf.properties"); Properties properties = new Properties(); String value; try { properties.load(in); value = properties.getProperty(key); in.close(); return value; } catch (IOException e) { e.printStackTrace(); } return null; }
时间: 2024-10-09 03:16:53