类 ConfigUtils

java.lang.Object
com.alibaba.ageiport.common.utils.ConfigUtils

public class ConfigUtils extends Object
  • 方法详细资料

    • isNotEmpty

      public static boolean isNotEmpty(String value)
    • isEmpty

      public static boolean isEmpty(String value)
    • isDefault

      public static boolean isDefault(String value)
    • replaceProperty

      public static String replaceProperty(String expression, Map<String,String> params)
    • getProperties

      public static Properties getProperties()
    • setProperties

      public static void setProperties(Properties properties)
    • addProperties

      public static void addProperties(Properties properties)
    • getProperty

      public static String getProperty(String key)
    • getProperty

      public static String getProperty(String key, String defaultValue)
    • getSystemProperty

      public static String getSystemProperty(String key)
      System environment -> System properties
      参数:
      key - key
      返回:
      value
    • loadProperties

      public static Properties loadProperties(String fileName)
    • loadProperties

      public static Properties loadProperties(String fileName, boolean allowMultiFile)
    • loadProperties

      public static Properties loadProperties(String fileName, boolean allowMultiFile, boolean optional)
      Load properties file to Properties from class path.
      参数:
      fileName - properties file name. for example: dubbo.properties, METE-INF/conf/foo.properties
      allowMultiFile - if false, throw IllegalStateException when found multi file on the class path.
      optional - is optional. if false, log warn when properties config file not found!s
      返回:
      loaded Properties content.
      • return empty Properties if no file found.
      • merge multi properties file if found multi file
      抛出:
      IllegalStateException - not allow multi-file, but multi-file exist on class path.
    • getPid

      public static int getPid()