Skip to content

Commit 1512e8a

Browse files
Merge pull request #275892 from mrm9084/SpringAppConfigAutoFailover
App Config Spring Auto Failover
2 parents ceb4911 + c34a601 commit 1512e8a

File tree

1 file changed

+20
-2
lines changed

1 file changed

+20
-2
lines changed

articles/azure-app-configuration/howto-geo-replication.md

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ ms.service: azure-app-configuration
77
ms.devlang: csharp
88
# ms.devlang: csharp, java
99
ms.topic: how-to
10-
ms.date: 03/20/2023
10+
ms.date: 05/24/2024
1111
ms.author: mametcal
1212
ms.custom: devx-track-azurecli
1313

@@ -164,6 +164,10 @@ spring.cloud.azure.appconfiguration.stores[0].connection-strings[1]="${SECOND_RE
164164
> - `spring-cloud-azure-appconfiguration-config-web`
165165
> - `spring-cloud-azure-starter-appconfiguration-config`
166166
167+
### [Kubernetes](#tab/kubernetes)
168+
169+
Not available.
170+
167171
---
168172

169173
The failover may occur if the App Configuration provider observes the following conditions.
@@ -179,7 +183,7 @@ You can specify one or more endpoints of a geo-replication-enabled App Configura
179183

180184
The automatically discovered replicas will be selected and used randomly. If you have a preference for specific replicas, you can explicitly specify their endpoints. This feature is enabled by default, but you can refer to the following sample code to disable it.
181185

182-
### [.NET](#tab/Dotnet)
186+
### [.NET](#tab/dotnet)
183187

184188
Edit the call to the `AddAzureAppConfiguration` method, which is often found in the `program.cs` file of your application.
185189

@@ -199,6 +203,20 @@ configurationBuilder.AddAzureAppConfiguration(options =>
199203
> - `Microsoft.Azure.AppConfiguration.AspNetCore`
200204
> - `Microsoft.Azure.AppConfiguration.Functions.Worker`
201205
206+
### [Java Spring](#tab/spring)
207+
208+
Specify the `replicaDiscoveryEnabled` property in the `bootstrap.properties` file of your application.
209+
210+
```properties
211+
spring.cloud.azure.appconfiguration.stores[0].replica-discovery-enabled=false
212+
```
213+
214+
> [!NOTE]
215+
> The automatic replica discovery support is available if you use version **5.11.0** or later of any of the following packages.
216+
> - `spring-cloud-azure-appconfiguration-config`
217+
> - `spring-cloud-azure-appconfiguration-config-web`
218+
> - `spring-cloud-azure-starter-appconfiguration-config`
219+
202220
### [Kubernetes](#tab/kubernetes)
203221

204222
Update the `AzureAppConfigurationProvider` resource of your Azure App Configuration Kubernetes Provider. Add a `replicaDiscoveryEnabled` property and set it to `false`.

0 commit comments

Comments
 (0)