类 SpringProperties

    • 方法详细资料

      • setProperty

        public static void setProperty​(String key,
                                       String value)
        Programmatically set a local property, overriding an entry in the spring.properties file (if any).
        参数:
        key - the property key
        value - the associated property value, or null to reset it
      • getProperty

        public static String getProperty​(String key)
        Retrieve the property value for the given key, checking local Spring properties first and falling back to JVM-level system properties.
        参数:
        key - the property key
        返回:
        the associated property value, or null if none found
      • setFlag

        public static void setFlag​(String key)
        Programmatically set a local flag to "true", overriding an entry in the spring.properties file (if any).
        参数:
        key - the property key
      • getFlag

        public static boolean getFlag​(String key)
        Retrieve the flag for the given property key.
        参数:
        key - the property key
        返回:
        true if the property is set to "true", false otherwise