Skip to content

Commit 1a5ba54

Browse files
Merge pull request #313198 from mrm9084/SpringBestPractices
App Config - Spring Best Practices
2 parents e5ee268 + ac35e08 commit 1a5ba54

1 file changed

Lines changed: 47 additions & 0 deletions

File tree

articles/azure-app-configuration/howto-best-practices.md

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,21 @@ configBuilder.AddAzureAppConfiguration(options =>
7575
});
7676
```
7777

78+
#### [Spring](#tab/spring)
79+
80+
```yaml
81+
spring:
82+
config:
83+
import: azureAppConfiguration
84+
cloud:
85+
azure:
86+
appconfiguration:
87+
stores:
88+
- endpoint: <your-app-configuration-store-endpoint>
89+
monitoring:
90+
enabled: true
91+
```
92+
7893
#### [JavaScript](#tab/javascript)
7994
8095
```javascript
@@ -88,6 +103,10 @@ const appConfig = await load(endpoint, credential, {
88103
});
89104
```
90105

106+
#### [Python](#tab/python)
107+
108+
The Azure App Configuration provider for Python doesn't support monitoring all selected keys for changes. You can only monitor individual keys. For more information, see [Monitoring a sentinel key](#monitoring-a-sentinel-key).
109+
91110
#### [Go](#tab/go)
92111

93112
```golang
@@ -149,6 +168,23 @@ configBuilder.AddAzureAppConfiguration(options =>
149168
});
150169
```
151170

171+
#### [Spring](#tab/spring)
172+
173+
```yaml
174+
spring:
175+
config:
176+
import: azureAppConfiguration
177+
cloud:
178+
azure:
179+
appconfiguration:
180+
stores:
181+
- endpoint: <your-app-configuration-store-endpoint>
182+
monitoring:
183+
enabled: true
184+
triggers:
185+
- key: SentinelKey
186+
```
187+
152188
#### [JavaScript](#tab/javascript)
153189
154190
```javascript
@@ -163,6 +199,17 @@ const appConfig = await load(endpoint, credential, {
163199
});
164200
```
165201

202+
#### [Python](#tab/python)
203+
204+
```python
205+
config = load(
206+
endpoint,
207+
credential,
208+
# Trigger a refresh only if the `SentinelKey` changes
209+
refresh_on=[WatchedKey(key="SentinelKey")]
210+
)
211+
```
212+
166213
#### [Go](#tab/go)
167214

168215
```golang

0 commit comments

Comments
 (0)