Add a dynamic configuration

更新时间:
复制 MD 格式

Dynamic configuration properties are key-value pairs that belong to a dynamic configuration class. This is similar to the relationship between a class and its properties in Java.

Procedure

  1. Log on to the SOFAStack console.

  2. In the left navigation pane, choose Middleware > Microservice Platform > Microservice > Dynamic Configuration.

  3. Click Add Configuration Class , and then configure the following parameters:

    You can create a configuration in one of two ways:

    • Create a custom configuration

      Click Create Custom Configuration and configure the following parameters:

      Parameter

      Description

      Domain

      Enter the namespace of the configuration class.

      It can contain only uppercase letters, lowercase letters, digits, and underscores (_).

      Application

      Enter the name of the application to which the configuration class belongs.

      • It must start with a letter.

      • It can contain uppercase letters, lowercase letters, digits, underscores (_), and hyphens (-).

      Class Identity

      A string that represents the configuration class. It must be the same as the ID field of the @DObject annotation in the application code. The fully qualified class name is typically used.

      • It must start with a letter.

      • It can contain uppercase letters, lowercase letters, digits, underscores (_), hyphens (-), and periods (.).

      Description (Optional)

      Enter a description for the configuration class.

    • Create from a template

      Click Create from Template and configure the template parameters.

  4. Click OK.

  5. Click Add Property next to the configuration class that you created. Then, enter a Property Name and a Description.

    Properties are key-value pairs. The specific property value is defined when you push the configuration to the server.

  6. Click OK.

    After you configure the properties, you can publish the property values directly to the target server or test them using a grayscale push. For more information, see Push a dynamic configuration.