更新时间:2024-03-05 GMT+08:00
分享

Spring Cloud

方法一

为微服务的“bootstrap.yml”文件增加以下配置,若已配置请忽略。

AK/SK与项目名称获取方法,请参考获取AK/SK与项目名称

spring:
  cloud:
    servicecomb:
      credentials:
        enabled: true
        accessKey: AK  #请输入已获取到的AK值
        secretKey: SK  #请输入已获取到的SK值
        project: 项目名称  #请输入已获取到的项目名称
        akskCustomCipher: default

方法二

为微服务添加如表1所示环境变量。

表1 环境变量

环境变量

说明

spring_cloud_servicecomb_credentials_accessKey

AK,结合用户实际值配置。

spring_cloud_servicecomb_credentials_secretKey

SK,结合用户实际值配置。

分享:

    相关文档

    相关产品