类 SystemPropertyInitializer

  • 所有已实现的接口:
    org.springframework.beans.factory.InitializingBean

    public class SystemPropertyInitializer
    extends java.lang.Object
    implements org.springframework.beans.factory.InitializingBean
    Helper class that sets up a System property with a default value. A System property is created with the specified key name, and default value (i.e. if the property already exists it is not changed).
    作者:
    Dave Syer
    • 字段概要

      字段 
      修饰符和类型字段说明
      static java.lang.StringENVIRONMENT
      Name of system property used by default.
    • 方法概要

      所有方法 实例方法 具体方法 
      修饰符和类型方法说明
      voidafterPropertiesSet()
      Sets the System property with the provided name and default value.
      voidsetDefaultValue​(java.lang.String defaultValue)
      Mandatory property specifying the default value of the System property.
      voidsetKeyName​(java.lang.String keyName)
      Set the key name for the System property that is created.
      • 从类继承的方法 java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 字段详细资料

    • 方法详细资料

      • setKeyName

        public void setKeyName​(java.lang.String keyName)
        Set the key name for the System property that is created. Defaults to ENVIRONMENT.
        参数:
        keyName - the key name to set
      • setDefaultValue

        public void setDefaultValue​(java.lang.String defaultValue)
        Mandatory property specifying the default value of the System property.
        参数:
        defaultValue - the default value to set
      • afterPropertiesSet

        public void afterPropertiesSet()
                                throws java.lang.Exception
        Sets the System property with the provided name and default value.
        指定者:
        afterPropertiesSet 在接口中 org.springframework.beans.factory.InitializingBean
        抛出:
        java.lang.Exception
        另请参阅:
        InitializingBean.afterPropertiesSet()