Dynamic environment switching

更新时间:
复制 MD 格式

mPaaS supports dynamic environment switching starting with baseline version 10.2.3.41.

Configure multi-environment config files

  1. Prepare the configuration files.

    Place multiple mPaaS configuration files in the rawfile directory. The filenames must end with .config.

    Note

    By default, the system reads the mpaas.config file.

  2. Specify the configuration file in code.
    Set the MPFramework.configName property to specify the configuration file to load at runtime.

    MPFramework.configName ="xxx";
    Note
    • xxx is the base filename, without the .config suffix.

    • If this property is not set, the system reads mpaas.config by default.

Configure multi-environment security images

  1. Prepare the resources.
    Place multiple security images in the rawfile directory and assign custom filenames.

    Note

    Each image filename must correspond to its configuration file, either by name or through a clear mapping.

  2. Specify the image in code.
    Set the MPFramework.imageName property to specify the security image to load at runtime.

    MPFramework.imageName ="xxx";
    Note
    • xxx is the base image filename, without the .png suffix.

    • Default behavior: If this property is not set, the system reads hs_1222.png.

    Example image

    image.png