类 ConfigUtils


  • public class ConfigUtils
    extends 
    • 方法概要

      所有方法 静态方法 具体方法 
      修饰符和类型 方法 说明
      static void  properties)  
      static int getPid()  
      static getProperties()  
      static  key)  
      static  key,  defaultValue)  
      static int getServerShutdownTimeout()  
      static  key)
      System environment -> System properties
      static boolean  value)  
      static boolean  value)  
      static boolean  value)  
      static  fileName)  
      static  fileName, boolean allowMultiFile)  
      static  fileName, boolean allowMultiFile, boolean optional)
      Load properties file to from class path.
      static <> <?> type,  cfg, <> def)
      Insert default extension into extension list.
      static  expression, <,​> params)  
      static void  properties)  
      • 从类继承的方法 java.lang.

        , , , , , , , ,
    • 方法详细资料

      • isNotEmpty

        public static boolean isNotEmpty​( value)
      • isEmpty

        public static boolean isEmpty​( value)
      • isDefault

        public static boolean isDefault​( value)
      • mergeValues

        public static <> mergeValues​(<?> type,
                                                cfg,
                                               <> def)
        Insert default extension into extension list.

        Extension list support

        • Special value default, means the location for default extensions.
        • Special symbol-, means remove. -foo1 will remove default extension 'foo'; -default will remove all default extensions.
        参数:
        type - Extension type
        cfg - Extension name list
        def - Default extension list
        返回:
        result extension list
      • replaceProperty

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

        public static  getProperties()
      • setProperties

        public static void setProperties​( properties)
      • addProperties

        public static void addProperties​( properties)
      • getProperty

        public static  getProperty​( key)
      • getProperty

        public static  getProperty​( key,
                                          defaultValue)
      • getSystemProperty

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

        public static  loadProperties​( fileName)
      • loadProperties

        public static  loadProperties​( fileName,
                                                boolean allowMultiFile)
      • loadProperties

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

        public static int getPid()
      • getServerShutdownTimeout

        public static int getServerShutdownTimeout()