Skip to content

Commit 61cf144

Browse files
committed
Spring Best Practices
1 parent de2dadd commit 61cf144

1 file changed

Lines changed: 43 additions & 0 deletions

File tree

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

Lines changed: 43 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
@@ -149,6 +164,23 @@ configBuilder.AddAzureAppConfiguration(options =>
149164
});
150165
```
151166

167+
#### [spring](#tab/spring)
168+
169+
```yaml
170+
spring:
171+
config:
172+
import: azureAppConfiguration
173+
cloud:
174+
azure:
175+
appconfiguration:
176+
stores:
177+
- endpoint: <your-app-configuration-store-endpoint>
178+
monitoring:
179+
enabled: true
180+
triggers:
181+
- key: SentinelKey
182+
```
183+
152184
#### [JavaScript](#tab/javascript)
153185
154186
```javascript
@@ -163,6 +195,17 @@ const appConfig = await load(endpoint, credential, {
163195
});
164196
```
165197

198+
#### [Python](#tab/python)
199+
200+
```python
201+
config = load(
202+
endpoint,
203+
credential,
204+
# Trigger a refresh only if the `SentinelKey` changes
205+
refresh_on=[WatchedKey(key="SentinelKey")]
206+
)
207+
```
208+
166209
#### [Go](#tab/go)
167210

168211
```golang

0 commit comments

Comments
 (0)