Annotation Type ConfigurationProperty


  • @Documented
    @Retention(RUNTIME)
    @Target(FIELD)
    public @interface ConfigurationProperty
    The metadata annotation used to declare on the Java field whose modifiers usually are static and final for the configuration property.

    The module that named "microsphere-annotation-processor" generates the metadata resource in the classpath.

    Since:
    1.0.0
    Author:
    Mercy
    • Optional Element Summary

      Optional Elements 
      Modifier and Type Optional Element Description
      java.lang.String defaultValue
      The default value of the configuration property.
      java.lang.String description
      The description of the configuration property.
      java.lang.String name
      The name of the configuration property.
      boolean required
      Whether the configuration property is required.
      java.lang.String[] source
      The source of the configuration property.
      java.lang.Class<?> type
      The type of the configuration property.
    • Field Detail

      • SYSTEM_PROPERTIES_SOURCE

        static final java.lang.String SYSTEM_PROPERTIES_SOURCE
        JDK System Properties
      • ENVIRONMENT_VARIABLES_SOURCE

        static final java.lang.String ENVIRONMENT_VARIABLES_SOURCE
        OS Environment Variables
      • APPLICATION_SOURCE

        static final java.lang.String APPLICATION_SOURCE
        Application
    • Element Detail

      • name

        java.lang.String name
        The name of the configuration property.
        Returns:
        empty content as default
        Default:
        ""
      • type

        java.lang.Class<?> type
        The type of the configuration property.
        Default:
        java.lang.String.class
      • defaultValue

        java.lang.String defaultValue
        The default value of the configuration property.
        Returns:
        empty content as default
        Default:
        ""
      • required

        boolean required
        Whether the configuration property is required.
        Returns:
        true if required, otherwise false
        Default:
        false
      • description

        java.lang.String description
        The description of the configuration property.
        Returns:
        empty content as default
        Default:
        ""
      • source

        java.lang.String[] source
        The source of the configuration property.
        Returns:
        empty array as default
        Default:
        {}