Basahin sa Ingles I-edit

Ibahagi sa


Quickstart: Enable and disable Spring Cloud Config Server in Azure Spring Apps

Note

The Basic, Standard, and Enterprise plans entered a retirement period on March 17, 2025. For more information, see the Azure Spring Apps retirement announcement.

The Standard consumption and dedicated plan entered a retirement period on September 30, 2024, with a complete shutdown by the end of March 2025. For more information, see Migrate Azure Spring Apps Standard consumption and dedicated plan to Azure Container Apps.

This article applies to: ✅ Standard consumption and dedicated (Preview) ❎ Basic/Standard ❎ Enterprise

This article describes how to enable and disable Spring Cloud Config Server for service registration and discovery in Azure Spring Apps. Spring Cloud Config Server is a centralized configuration service for distributed systems. Config Server uses a pluggable repository layer that currently supports local storage, Git, and Subversion. In this quickstart, you set up the Config Server to get data from a Git repository.

Prerequisites

  • An Azure subscription. If you don't have a subscription, create a free account before you begin.
  • Azure CLI. Use the following command to install the Azure Spring Apps extension: az extension add --name spring.
  • Git.
  • An Azure Spring Apps Standard consumption and dedicated plan service instance.

Set up Config Server

Use the following command to set up Config Server with the project specified by the --uri parameter. This example uses the Git repository for Azure Spring Apps as an example project.

az spring config-server git set \
    --name <Azure-Spring-Apps-instance-name> \
    --uri https://github.com/Azure-Samples/azure-spring-apps-samples \
    --search-paths steeltoe-sample/config

Tip

For information on using a private repository for Config Server, see Configure a managed Spring Cloud Config Server in Azure Spring Apps.

Enable Config Server

Use the following command to enable Config Server:

az spring config-server enable \
    --resource-group <resource-group-name> \
    --name <Azure-Spring-Apps-instance-name>

Disable Config Server

Use the following command to disable Config Server:

az spring config-server disable \
    --resource-group <resource-group-name> \
    --name <Azure-Spring-Apps-instance-name>

Next steps