You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/azure-app-configuration/enable-dynamic-configuration-java-spring-app.md
+8-8Lines changed: 8 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -23,7 +23,7 @@ Both libraries support manual triggering to check for refreshed configuration va
23
23
24
24
Refresh allows you to update your configuration values without having to restart your application, though it causes all beans in the `@RefreshScope` to be recreated. It checks for any changes to configured triggers, including metadata. By default, the minimum amount of time between checks for changes, refresh interval, is set to 30 seconds.
25
25
26
-
`spring-cloud-azure-appconfiguration-config-web`'s automated refresh is triggered based on activity, specifically Spring Web's `ServletRequestHandledEvent`. If a `ServletRequestHandledEvent` isn't triggered, `spring-cloud-azure-appconfiguration-config-web`'s automated refresh doesn't trigger a refresh even if the cache expiration time has expired.
26
+
`spring-cloud-azure-appconfiguration-config-web`'s automated refresh is triggered based on activity, specifically Spring Web's `ServletRequestHandledEvent`. If a `ServletRequestHandledEvent` isn't triggered, `spring-cloud-azure-appconfiguration-config-web`'s automated refresh doesn't trigger a refresh even if the cache expiration time is expired.
27
27
28
28
## Use manual refresh
29
29
@@ -57,9 +57,9 @@ App Configuration exposes `AppConfigurationRefresh`, which can be used to check
57
57
}
58
58
```
59
59
60
-
`AppConfigurationRefresh`'s `refreshConfigurations()` returns a `Mono` that is true if a refresh has been triggered, and false if not. False means either the cache expiration time hasn't expired, there was no change, or another thread is currently checking for a refresh.
60
+
`AppConfigurationRefresh`'s `refreshConfigurations()` returns a `Mono` that is true if a refresh is triggered, and false if not. False means either the cache expiration time isn't expired, there was no change, or another thread is currently checking for a refresh.
@@ -84,7 +84,7 @@ App Configuration exposes `AppConfigurationRefresh`, which can be used to check
84
84
mvn spring-boot:run
85
85
```
86
86
87
-
1. Open a browser window, and go to the URL: `http://localhost:8080`. You see the message associated with your key.
87
+
1. Open a browser window, and go to the URL: `http://localhost:8080`. You see the message associated with your key.
88
88
89
89
You can also use *curl* to test your application, for example:
90
90
@@ -98,7 +98,7 @@ App Configuration exposes `AppConfigurationRefresh`, which can be used to check
98
98
|---|---|
99
99
| /application/config.message | Hello - Updated |
100
100
101
-
1. Update the sentinel key you created earlier to a new value. This change triggers the application to refresh all configuration keys once the refresh interval has passed.
101
+
1. Update the sentinel key you created earlier to a new value. This change triggers the application to refresh all configuration keys once the refresh interval is passed.
102
102
103
103
| Key | Value |
104
104
|---|---|
@@ -123,7 +123,7 @@ Then, open the *pom.xml* file in a text editor and add a `<dependency>` for `spr
123
123
</dependency>
124
124
```
125
125
126
-
1. Update `bootstrap.properties` to enable refresh
126
+
1. To enable refresh update `bootstrap.properties`:
@@ -148,7 +148,7 @@ Then, open the *pom.xml* file in a text editor and add a `<dependency>` for `spr
148
148
mvn spring-boot:run
149
149
```
150
150
151
-
1. Open a browser window, and go to the URL: `http://localhost:8080`. You now see the message associated with your key.
151
+
1. Open a browser window, and go to the URL: `http://localhost:8080`. You now see the message associated with your key.
152
152
153
153
You can also use *curl* to test your application, for example:
154
154
@@ -162,7 +162,7 @@ Then, open the *pom.xml* file in a text editor and add a `<dependency>` for `spr
162
162
|---|---|
163
163
| /application/config.message | Hello - Updated |
164
164
165
-
1. Update the sentinel key you created earlier to a new value. This change triggers the application to refresh all configuration keys once the refresh interval has passed.
165
+
1. Update the sentinel key you created earlier to a new value. This change triggers the application to refresh all configuration keys once the refresh interval is passed.
Copy file name to clipboardExpand all lines: articles/azure-app-configuration/enable-dynamic-configuration-java-spring-push-refresh.md
+9-9Lines changed: 9 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,7 +17,7 @@ ms.author: mametcal
17
17
18
18
The App Configuration Java Spring client library supports updating configuration on demand without causing an application to restart. An application can be configured to detect changes in App Configuration using one or both of the following two approaches.
19
19
20
-
- Poll Model: This is the default behavior that uses polling to detect changes in configuration. Once the cached value of a setting expires, the next call to `AppConfigurationRefresh`'s `refreshConfigurations` sends a request to the server to check if the configuration has changed, and pulls the updated configuration if needed.
20
+
- Poll Model: The Poll Model is the default behavior that uses polling to detect changes in configuration. Once the cached value of a setting expires, the next call to `AppConfigurationRefresh`'s `refreshConfigurations` sends a request to the server to check if the configuration changed, and pulls the updated configuration if needed.
21
21
22
22
- Push Model: This uses [App Configuration events](./concept-app-configuration-event.md) to detect changes in configuration. Once App Configuration is set up to send key value change events with Event Grid, with a [Web Hook](../event-grid/handler-event-hubs.md), the application can use these events to optimize the total number of requests needed to keep the configuration updated.
23
23
@@ -77,7 +77,7 @@ In this tutorial, you learn how to:
1. Navigate to the `resources` directory of your app and open `bootstrap.properties` and configure Azure App Configuration Push Refresh. If the file does not exist, create it. Add the following line to the file.
80
+
1. Navigate to the `resources` directory of your app and open `bootstrap.properties` and configure Azure App Configuration Push Refresh. If the file doesn't exist, create it. Add the following line to the file.
81
81
82
82
### [Microsoft Entra ID (recommended)](#tab/entra-id)
83
83
You use the `DefaultAzureCredential` to authenticate to your App Configuration store. Follow the [instructions](./concept-enable-rbac.md#authentication-with-token-credentials) to assign your credential the **App Configuration Data Reader** role. Be sure to allow sufficient time for the permission to propagate before running your application. Create a new file named *AppConfigCredential.java* and add the following lines:
@@ -93,7 +93,7 @@ In this tutorial, you learn how to:
Additionally, you need to add the following code to your project, unless you want to use just Managed Identity:
96
+
Additionally, you need to add the following code to your project, unless you want to use Managed Identity:
97
97
98
98
```java
99
99
import org.springframework.stereotype.Component;
@@ -133,7 +133,7 @@ A random delay is added before the cached value is marked as dirty to reduce pot
133
133
134
134
## Build and run the app in app service
135
135
136
-
Event Grid Web Hooks require validation on creation. You can validate by following this [guide](../event-grid/webhook-event-delivery.md) or by starting your application with Azure App Configuration Spring Web Library already configured, which will register your application for you. To use an event subscription, follow the steps in the next two sections.
136
+
Event Grid Web Hooks require validation on creation. You can validate by following this [guide](../event-grid/webhook-event-delivery.md) or by starting your application with Azure App Configuration Spring Web Library already configured, which registers your application for you. To use an event subscription, follow the steps in the next two sections.
137
137
138
138
1. Set an environment variable.
139
139
@@ -180,7 +180,7 @@ Event Grid Web Hooks require validation on creation. You can validate by followi
180
180
```
181
181
---
182
182
183
-
Restart the command prompt to allow the change to take effect. Print the value of the environment variable to validate that it is set properly.
183
+
Restart the command prompt to allow the change to take effect. Print the value of the environment variable to validate that it's set properly.
184
184
185
185
---
186
186
@@ -210,17 +210,17 @@ Event Grid Web Hooks require validation on creation. You can validate by followi
210
210
211
211
:::image type="content" source="./media/events-pane.png" alt-text="The events pane has an option to create new Subscriptions." :::
212
212
213
-
1. Enter a name for the `Event Subscription` and the `System Topic`. By default the Event Types Key-Value modified and Key-Value deleted are set, this can be changed along with using the Filters tab to choose the exact reasons a Push Event will be sent.
213
+
1. Enter a name for the `Event Subscription` and the `System Topic`. By default the Event Types Key-Value modified and Key-Value deleted are set, the reason can be changed along with using the Filters tab to choose the exact reasons a Push Event is sent.
214
214
215
215
:::image type="content" source="./media/create-event-subscription.png" alt-text="Events require a name, topic, and filters." :::
216
216
217
217
1. Select the `Endpoint Type` as `Web Hook`, select`Select an endpoint`.
218
218
219
219
:::image type="content" source="./media/event-subscription-webhook-endpoint.png" alt-text="Selecting Endpoint creates a new blade to enter the endpoint URI." :::
220
220
221
-
1. The endpoint is the URI of the application + "/actuator/appconfiguration-refresh?{your-token-name}={your-token-secret}". For example `https://my-azure-webapp.azurewebsites.net/actuator/appconfiguration-refresh?myToken=myTokenSecret`
221
+
1. The endpoint is the URI of the application + "/actuator/appconfiguration-refresh?{your-token-name}={your-token-secret}". For example,`https://my-azure-webapp.azurewebsites.net/actuator/appconfiguration-refresh?myToken=myTokenSecret`
222
222
223
-
1. Select `Create` to create the event subscription. When `Create` is selected a registration request for the Web Hook will be sent to your application. This is received by the Azure App Configuration client library, verified, and returns a valid response.
223
+
1. Select `Create` to create the event subscription. When `Create` is selected, a registration request for the Web Hook is sent to your application. The request is received by the Azure App Configuration client library, verified, and returns a valid response.
224
224
225
225
1. Select `Event Subscriptions`in the `Events` pane to validate that the subscription was created successfully.
226
226
@@ -230,7 +230,7 @@ Event Grid Web Hooks require validation on creation. You can validate by followi
230
230
> When subscribing forconfiguration changes, one or more filters can be used to reduce the number of events sent to your application. These can be configured either as [Event Grid subscription filters](../event-grid/event-filtering.md). For example, a subscription filter can be used to only subscribe to events for changesin a key that starts with a specific string.
231
231
232
232
> [!NOTE]
233
-
> If you have multiple instances of your application running, you can use the `appconfiguration-refresh-bus` endpoint which requires setting up Azure Service Bus, which is used to send a message to all instances of your application to refresh their configuration. This is useful if you have multiple instances of your application running and want to ensure that all instances are updated with the latest configuration. This endpoint isn't available unless you have `spring-cloud-bus` as a dependency with it configured. See the [Azure Service Bus Spring Cloud Bus documentation](/azure/developer/java/spring-framework/using-service-bus-in-spring-applications) for more information. The service bus connection only needs to be set up and the Azure App Configuration library will handle sending and receiving the messages.
233
+
> If you have multiple instances of your application running, you can use the `appconfiguration-refresh-bus` endpoint which requires setting up Azure Service Bus, which is used to send a message to all instances of your application to refresh their configuration. This is useful if you have multiple instances of your application running and want to ensure that all instances are updated with the latest configuration. This endpoint isn't available unless you have `spring-cloud-bus` as a dependency with it configured. For more information, see [Azure Service Bus Spring Cloud Bus documentation](/azure/developer/java/spring-framework/using-service-bus-in-spring-applications). The service bus connection only needs to be set up and the Azure App Configuration library will handle sending and receiving the messages.
Copy file name to clipboardExpand all lines: articles/azure-app-configuration/quickstart-feature-flag-spring-boot.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -41,14 +41,14 @@ To create a new Spring Boot project:
41
41
42
42
* Generate a **Maven** project with **Java**.
43
43
* Specify a **Spring Boot** version that's equal to or greater than 2.0.
44
-
* Specify the **Group** and **Artifact** names for your application. This article uses `com.example` and `demo`.
44
+
* Specify the **Group** and **Artifact** names for your application. This article uses `com.example` and `demo`.
45
45
* Add the **Spring Web** dependency.
46
46
47
47
1. After you specify the previous options, select **Generate Project**. When prompted, download the project to your local computer.
48
48
49
49
## Add feature management
50
50
51
-
1. After you extract the files on your local system, your Spring Boot application is ready for editing. Locate *pom.xml* in the root directory of your app.
51
+
1. After you extract the files on your local system, your Spring Boot application is ready for editing. Locate *pom.xml* in the root directory of your app.
52
52
53
53
1. Open the *pom.xml* file in a text editor and add the following to the list of `<dependencies>`:
54
54
@@ -85,7 +85,7 @@ To create a new Spring Boot project:
85
85
## Connect to an App Configuration store
86
86
87
87
88
-
1. Navigate to the `resources` directory of your app and open `bootstrap.properties`. If the file does not exist, create it. Add the following line to the file.
88
+
1. Navigate to the `resources` directory of your app and open `bootstrap.properties`. If the file does not exist, create it. Add the following line to the file.
89
89
90
90
### [Microsoft Entra ID (recommended)](#tab/entra-id)
91
91
You use the `DefaultAzureCredential` to authenticate to your App Configuration store. Follow the [instructions](./concept-enable-rbac.md#authentication-with-token-credentials) to assign your credential the **App Configuration Data Reader** role. Be sure to allow sufficient time for the permission to propagate before running your application. Create a new file named *AppConfigCredential.java* and add the following lines:
@@ -95,7 +95,7 @@ To create a new Spring Boot project:
Copy file name to clipboardExpand all lines: articles/azure-app-configuration/use-feature-flags-spring-boot.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,7 +22,7 @@ The Feature Management libraries also manage feature flag lifecycles behind the
22
22
23
23
The [Add feature flags to a Spring Boot app Quickstart](./quickstart-feature-flag-spring-boot.md) shows several ways to add feature flags in a Spring Boot application. This tutorial explains these methods in more detail.
24
24
25
-
In this tutorial, you will learn how to:
25
+
In this tutorial, you learn how to:
26
26
27
27
> [!div class="checklist"]
28
28
> * Add feature flags in key parts of your application to control feature availability.
@@ -174,7 +174,7 @@ public String getOldFeature() {
174
174
175
175
## Next steps
176
176
177
-
In this tutorial, you learned how to implement feature flags in your Spring Boot application by using the `spring-cloud-azure-feature-management-web` libraries. For further questions see the [reference documentation](https://go.microsoft.com/fwlink/?linkid=2180917), it has all of the details on how the Spring Cloud Azure App Configuration library works.For more information about feature management support in Spring Boot and App Configuration, see the following resources:
177
+
In this tutorial, you learned how to implement feature flags in your Spring Boot application by using the `spring-cloud-azure-feature-management-web` libraries. For further questions see the [reference documentation](https://go.microsoft.com/fwlink/?linkid=2180917). The reference documentation has all of the details on how the Spring Cloud Azure App Configuration library works.For more information about feature management support in Spring Boot and App Configuration, see the following resources:
178
178
179
179
* [Spring Boot feature flag sample code](./quickstart-feature-flag-spring-boot.md)
Copy file name to clipboardExpand all lines: articles/azure-app-configuration/use-key-vault-references-spring-boot.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,7 +17,7 @@ In this tutorial, you learn how to use the Azure App Configuration service toget
17
17
18
18
App Configuration helps you use the services together by creating keys that reference values stored in Key Vault. When App Configuration creates such keys, it stores the URIs of Key Vault values rather than the values themselves.
19
19
20
-
Your application uses the App Configuration client provider to retrieve Key Vault references, just as it does for any other keys stored in App Configuration. In this case, the values stored in App Configuration are URIs that reference the values in the Key Vault. They are not Key Vault values or credentials. Because the client provider recognizes the keys as Key Vault references, it uses Key Vault to retrieve their values.
20
+
Your application uses the App Configuration client provider to retrieve Key Vault references, just as it does for any other keys stored in App Configuration. In this case, the values stored in App Configuration are URIs that reference the values in the Key Vault. They aren't Key Vault values or credentials. Because the client provider recognizes the keys as Key Vault references, it uses Key Vault to retrieve their values.
21
21
22
22
Your application is responsible for authenticating properly to both App Configuration and Key Vault. The two services don't communicate directly.
23
23
@@ -43,7 +43,7 @@ In this tutorial, you learn how to:
43
43
44
44

45
45
1. In the search box, enter **Key Vault**.
46
-
1. From the results list, select **Key vaults** on the left.
46
+
1. From the results list, select **Key vaults**.
47
47
1. In **Key vaults**, select **Add**.
48
48
1. On the right in **Create key vault**, provide the following information:
49
49
* Select **Subscription** to choose a subscription.
@@ -59,7 +59,7 @@ At this point, your Azure account is the only one authorized to access this new
59
59
60
60
## Add a secret to Key Vault
61
61
62
-
To add a secret to the vault, you need to take just a few additional steps. In this case, add a message that you can use to test Key Vault retrieval. The message is called **Message**, and you store the value "Hello from Key Vault" in it.
62
+
To add a secret to the vault, you need to take just a few more steps. In this case, add a message that you can use to test Key Vault retrieval. The message is called **Message**, and you store the value "Hello from Key Vault" in it.
63
63
64
64
1. From the Key Vault properties pages, select **Secrets**.
0 commit comments