Steps for using the Spring Cloud ACM SDK are as follows.

  1. Add Maven dependency.
  2. Configure the application name and the application group.

    Configure in Spring Boot, and configure and
  3. Configure the ACM environment and authentication information.

    Configure  in Spring Boot, and configure alibaba.acm.endpoint, alibaba.acm.namespace, alibaba.acm.accessKey, and alibaba.acm.secretKey:
    # Namespace ID
     # Access ACM with instance RAM role
    # alibaba.acm.ramRoleName=xxx
    # If it is an encrypted configuration, then add the following two lines for automatic decryption.
    # alibaba.acm.openKMSFilter=true
    # Regionid can be obtained by the Zone ID in the namespace details
    # alibaba.acm.regionId=xxx
    # If group is not DEFAULT_GROUP, then set manually.
  4. Add application configuration in the ACM console.

    Log on to the ACM console and create a new configuration under the corresponding namespace.

    • Write the Data ID in the following format:


      For example:

    • Select TEXT as the configuration format, and enter the key-value pairs to be injected into the application: = 001 = juven2
      user.age = 88


  • spring-cloud-starter-acm 1.0.7  and higher version now supports Spring Boot 2.x.
  • We recommend that you use Spring Boot 2.x of 2.0.1.RELEASE and higher version. 2..0.0. RELEASE version has a known bug of reading old data.
  • To download the complete sample code, click:

Related documents