12345678910111213141516171819202122 |
- package com.persagy.framework.util;
- import java.io.IOException;
- import java.util.Properties;
- public class PropertyUtil {
- public static String getProperty(String key, String propertyFilePath) {
- Properties properties = new Properties();
- try {
- properties.load(PropertyUtil.class.getResourceAsStream(propertyFilePath));
- } catch (IOException e) {
- e.printStackTrace();
- }
- String value = properties.getProperty(key);
-
- return value;
- }
-
- public static String getSystemProperty(String key) {
- return getProperty(key, "/config/system.properties");
- }
- }
|