Skip to content

Commit a3eb229

Browse files
mrm9084KarlErickson
authored andcommitted
acrolinx updates
1 parent 511094d commit a3eb229

File tree

1 file changed

+17
-12
lines changed

1 file changed

+17
-12
lines changed

articles/java/spring-framework/app-configuration-support.md

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ In this example, if both the stores have the same configuration key, then the co
144144
145145
### Selecting configurations
146146

147-
Configurations are loaded by their key and label. By default, the configurations that start with the key `/application/` are loaded. The default label is `\0` which appears as `(No Label)` in the Azure portal. If a Spring profile is set, and no label is provided, then the default label is your Spring Profiles i.e. `${spring.profiles.active}`.
147+
The library loads configurations using their key and label. By default, the configurations that start with the key `/application/` are loaded. The default label is `\0`, which appears as `(No Label)` in the Azure portal. If a Spring profile is set, and no label is provided, then the default label is your Spring Profiles which is `${spring.profiles.active}`.
148148

149149
You can configure which configurations are loaded by selecting different key and label filters:
150150

@@ -172,7 +172,7 @@ The `label-filter` property supports the following filters:
172172
| `1.0.*` | Matches labels that start with `1.0.*`. |
173173
| `,1.0.0` | Matches labels `null` and `1.0.0`. Limited to five comma-separated values. |
174174

175-
If you're using YAML with label filters, and you need to start with `,`, then the label filter needs to be surrounded by single quotes. This allows you to load configuration with no label first, followed by configurations with specific labels in the same filter:
175+
If you're using YAML with label filters, and you want to load configuration with no label and more configurations with other labels you need to include an empty `,` for example `,dev` will match `\0` and `dev`, then the label filter needs to be surrounded by single quotes. This allows you to load configuration with no label first, followed by configurations with specific labels in the same filter:
176176

177177
```yml
178178
spring:
@@ -199,7 +199,7 @@ spring.cloud.azure.appconfiguration.stores[0].selects[0].label-filter=,${spring.
199199
spring.cloud.azure.appconfiguration.stores[0].selects[1].label-filter=${spring.profiles.active}_local
200200
```
201201

202-
In the first `label-filter`, all configurations with the `\0` label are loaded, followed by all configurations matching the Spring Profiles. Spring Profiles have priority over the `\0` configurations, because they're at the end.
202+
In the first `label-filter`, the library first loads all configurations with the `\0` label, followed by all configurations matching the Spring Profiles. Spring Profiles have priority over the `\0` configurations, because they're at the end.
203203

204204
In the second `label-filter`, the string `_local` is appended to the end of the Spring Profiles, though only to the last Spring Profile if there is more than one.
205205

@@ -279,7 +279,7 @@ spring.cloud.azure.appconfiguration.stores[0].connection-strings[1]=[your replic
279279

280280
If all provided replica endpoints fail, the library attempts to connect to auto discovered replicas of the primary store.
281281

282-
This can be disabled with the setting `spring.cloud.azure.appconfiguration.stores[0].replica-discovery-enabled=false`.
282+
Replication can be disabled with the setting `spring.cloud.azure.appconfiguration.stores[0].replica-discovery-enabled=false`.
283283

284284
### Creating a configuration store with geo-replication
285285

@@ -298,7 +298,7 @@ Azure App Configuration supports multiple types of key values, some of which hav
298298
The library supports configurations with `${}`-style environment placeholders. When referencing an Azure App Configuration key with a placeholder, remove prefixes from the reference. For example, `/application/config.message` is referenced as `${config.message}`.
299299

300300
> [!NOTE]
301-
> The prefix being removed matches the value `spring.cloud.azure.appconfiguration.stores[0].selects[0].key-filter`. This can be changed by setting a value for `spring.cloud.azure.appconfiguration.stores[0].trim-key-prefix[0]`.
301+
> The prefix being removed matches the value `spring.cloud.azure.appconfiguration.stores[0].selects[0].key-filter`. The prefix being trimmed can be changed by setting a value for `spring.cloud.azure.appconfiguration.stores[0].trim-key-prefix[0]`.
302302

303303
### JSON
304304

@@ -331,7 +331,7 @@ public class MyConfigurations {
331331

332332
### Key Vault references
333333

334-
Azure App Configuration and its libraries support referencing secrets stored in Key Vault. In App Configuration, you can create keys with values that map to secrets stored in a Key Vault. Secrets are securely stored in Key Vault, but can be accessed in the same way as any other configuration after it's loaded.
334+
Azure App Configuration and its libraries support referencing secrets stored in Key Vault. In App Configuration, you can create keys with values that map to secrets stored in a Key Vault. Secrets remain secure in Key Vault, but you can access them in the same way as any other configuration when loading the app.
335335

336336
Your application uses the client provider to retrieve Key Vault references, just as it does for any other keys stored in App Configuration. Because the client recognizes the keys as Key Vault references, they have a unique content-type, and the client connects to Key Vault to retrieve their values for you.
337337

@@ -445,7 +445,7 @@ feature-management:
445445
This example has the following feature flags:
446446

447447
- `feature-t` is set to `false`. This setting always returns the feature flag's value.
448-
- `feature-u` is used with feature filters. These filters are defined under the `enabled-for` property. In this case, `feature-u` has one feature filter called `Random`, which doesn't require any configuration, so only the name property is required.
448+
- `feature-u` is used with feature filters. These filters are defined under the `enabled-for` property. In this case, `feature-u` has one feature filter called `Random`, which doesn't require any configuration, so only the name property is required.
449449
- `feature-v` specifies a feature filter named `TimeWindowFilter`. This feature filter can be passed parameters to use as configuration. In this example, a `TimeWindowFilter`, passes in the start and end times during which the feature is active.
450450
- `feature-w` is used for the `AlwaysOnFilter`, which always evaluates to `true`. The `evaluate` field is used to stop the evaluation of the feature filters, and results in the feature filter always returning `false`.
451451

@@ -473,7 +473,7 @@ if (featureManager.isEnabled("feature-t")) {
473473
> [!NOTE]
474474
> `FeatureManager` also has an asynchronous version of `isEnabled` called `isEnabledAsync`.
475475

476-
If you haven't configured feature management or the feature flag doesn't exist, `isEnabled` always returns `false`. If an existing feature flag is configured with an unknown feature filter, then a `FilterNotFoundException` is thrown. You can change this behavior to return `false` by configuring `fail-fast` to `false`. The following table describes `fail-fast`:
476+
Without feature management configuration or when the feature flag does not exist, `isEnabled` always returns `false`. If an existing feature flag is configured with an unknown feature filter, then a `FilterNotFoundException` is thrown. You can change this behavior to return `false` by configuring `fail-fast` to `false`. The following table describes `fail-fast`:
477477

478478
| Name | Description | Required | Default |
479479
|---------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------|----------|---------|
@@ -716,7 +716,7 @@ Options are available to customize how targeting evaluation is performed across
716716

717717
Enabling config refresh for your configurations lets you pull their latest values from your App Configuration store or stores without having to restart the application.
718718

719-
To enable refresh, you need to enable monitoring along with monitoring triggers. A monitoring trigger is a key with an optional label that's checked for value changes to trigger updates. The value of the monitoring trigger can be any value, as long as it changes when a refresh is needed.
719+
To enable refresh, you need to enable monitoring along with monitoring triggers. A monitoring trigger is a key with an optional label which the system monitors for value changes to trigger updates. The value of the monitoring trigger can be any value, as long as it changes when a refresh is needed.
720720

721721
> [!NOTE]
722722
> Any operation that changes the ETag of a monitoring trigger causes a refresh, such as a content-type change.
@@ -755,6 +755,11 @@ spring.cloud.azure.appconfiguration.stores[0].monitoring.refresh-interval= 5m
755755

756756
#### Automated
757757

758+
When the refresh interval ends and the system attempts a refresh, it checks all triggers in the given store for changes. Any change to the key causes a refresh to trigger. Because the libraries integrate with the Spring refresh system, any refresh reloads all configurations from all stores. You can set the refresh interval to any interval longer than 1 second. The supported units for the refresh interval are `s`, `m`, `h`, and `d` for seconds, minutes, hours, and days respectively. The following example sets the refresh interval to 5 minutes:
759+
```
760+
761+
#### Automated
762+
758763
When you use the `spring-cloud-azure-appconfiguration-config-web` library, the application automatically checks for a refresh whenever a servlet request occurs, specifically `ServletRequestHandledEvent`. The most common way this event is sent is by requests to endpoints in a `@RestController`.
759764

760765
#### Manual
@@ -776,7 +781,7 @@ The `appconfiguration-refresh` property expires the refresh interval, so the rem
776781
management.endpoints.web.exposure.include= appconfiguration-refresh, appconfiguration-refresh-bus
777782
```
778783

779-
In addition to exposing the refresh endpoints, a required query parameter has been added for security. No token name or value is set by default, but setting one is required in order to use the endpoints, as shown in the following example:
784+
In addition to exposing the refresh endpoints, the library requires a query parameter for security. No token name or value exists by default, but you must set one to use the endpoints, as shown in the following example:
780785

781786
```properties
782787
spring.cloud.azure.appconfiguration.stores[0].monitoring.push-notification.primary-token.name=[primary-token-name]
@@ -810,7 +815,7 @@ Because Azure Key Vault stores the public and private key pair of a certificate
810815

811816
### Feature flag refresh
812817

813-
If feature flags and monitoring are both enabled, then by default the refresh interval for feature flags is set to 30 seconds. After the refresh interval has passed, all feature flags are checked in the given store for changes. Any change to the key causes a refresh to trigger. Because the libraries integrate with the Spring refresh system, any refresh reloads all configurations from all stores. You can set the refresh interval to any interval longer than 1 second. The supported units for the refresh interval are `s`, `m`, `h`, and `d` for seconds, minutes, hours, and days respectively. The following example sets the refresh interval to 5 minutes:
818+
If feature flags and monitoring are both enabled, then by default the refresh interval for feature flags is set to 30 seconds. When the refresh interval ends, the system checks all feature flags in the given store for changes. Any change to the key causes a refresh to trigger. Because the libraries integrate with the Spring refresh system, any refresh reloads all configurations from all stores. You can set the refresh interval to any interval longer than 1 second. The supported units for the refresh interval are `s`, `m`, `h`, and `d` for seconds, minutes, hours, and days respectively. The following example sets the refresh interval to 5 minutes:
814819

815820
```properties
816821
spring.cloud.azure.appconfiguration.stores[0].monitoring.feature-flag-refresh-interval= 5m
@@ -843,7 +848,7 @@ public interface SecretClientCustomizer {
843848
These interfaces allow for customization of the HTTP client and its configurations. The following example replaces the default `HttpClient` with another one that uses a proxy for all traffic directed to App Configuration and Key Vault.
844849

845850
> [!NOTE]
846-
> The `ConfigurationClientBuilder` and `SecretClientBuilder` are already set up for use when passed into `customize`. Any changes to the clients, including the credentials and retry policy, override those already in place.
851+
> The `ConfigurationClientBuilder` and `SecretClientBuilder` are already set up for use when passed into `customize`. Any changes to the clients, including the credentials and retry policy, override the defaults already in place.
847852
>
848853
> You can also do this configuration by using [Spring Cloud Azure configuration](configuration.md).
849854

0 commit comments

Comments
 (0)