Updated on 2024-05-06 GMT+08:00

Spring Cloud

Method 1

Add the following configurations to the bootstrap.yml file of the microservice. If they are configured, skip this step.

For details about how to obtain the AK/SK and project name, see Obtaining the AK/SK and Project Name.

spring:
  cloud:
    servicecomb:
      credentials:
        enabled: true
        accessKey: AK #Enter the AK.
        secretKey: SK #Enter the SK.
        project: Project name #Enter the project name.
        akskCustomCipher: default

Method 2

Add the environment variables listed in Table 1 to the microservice.

Table 1 Environment variables

Environment Variable

Description

spring_cloud_servicecomb_credentials_accessKey

AK. Set it based on the actual value.

spring_cloud_servicecomb_credentials_secretKey

SK. Set it based on the actual value.