A key feature of cloud-native applications is externalized configuration - the ability to store, manage, and version configuration separately from the application code. In this section, we'll configure a Spring Apps Config Server to enable this functionality. In the next section, you'll see how Spring Apps Config can inject configuration from a Git repository into your application.
-
Navigate to Azure Portal. From the resource group spring-apps-workshop- select the Azure Spring Apps Instance named azure-spring-apps-lab-.
-
Go to the Overview page of Azure Spring Apps server and select
Config server
in the menu underSettings
-
On the Config Server page, follow the below mentioned instructions:
- Configure the repository by providing the public repository URI https://github.com/Azure-Samples/spring-cloud-sample-public-config.git inside URI field of Default repository
💡 Make sure you include the
.git
ending in the URL.- Click on "Validate" and wait for the operation to succeed
-
Click on "Apply" and wait for the operation to succeed.
We have now created a private configuration repository. We have enabled Azure Spring Apps to create a configuration server with the configuration files from this repository.
In the next section, we will create an application that consumes this configuration, specifically the custom message we defined in application.yml
.