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
#Customer intent: As a Java Spring developer, I want to dynamically update my app to use the latest configuration data in App Configuration.
@@ -23,15 +23,15 @@ 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`is not triggered, `spring-cloud-azure-appconfiguration-config-web`'s automated refresh does not 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 has expired.
27
27
28
28
## Use manual refresh
29
29
30
30
To use manual refresh, start with a Spring Boot app that uses App Configuration, such as the app you create by following the [Spring Boot quickstart for App Configuration](quickstart-java-spring-app.md).
31
31
32
-
App Configuration exposes `AppConfigurationRefresh`, which can be used to check if the cache is expired and if it is expired a refresh is triggered.
32
+
App Configuration exposes `AppConfigurationRefresh`, which can be used to check if the cache is expired. If it's expired, a refresh is triggered.
33
33
34
-
1.Update HelloController to use `AppConfigurationRefresh`.
34
+
1.To use `AppConfigurationRefresh`, update HelloController.
@@ -59,7 +59,7 @@ App Configuration exposes `AppConfigurationRefresh`, which can be used to check
59
59
60
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.
61
61
62
-
1.Update `bootstrap.properties` to enable refresh
62
+
1.Update `bootstrap.properties` to enable 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 will 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
@@ -107,7 +107,7 @@ App Configuration exposes `AppConfigurationRefresh`, which can be used to check
107
107
1. Refresh the browser page twice to see the new message displayed. The first time triggers the refresh, the second loads the changes.
108
108
109
109
> [!NOTE]
110
-
>The library only checks for changes on the after the refresh interval has passed, if the period hasn't passed then no change will be seen, you will have to wait for the period to pass then trigger the refresh check.
110
+
>The library only checks for changes on the after the refresh interval has passed. If the period hasn't passed then no change is displayed. Wait for the period to pass, then trigger the refresh check.
111
111
112
112
## Use automated refresh
113
113
@@ -164,7 +164,7 @@ Then, open the *pom.xml* file in a text editor and add a `<dependency>` for `spr
164
164
mvn spring-boot:run
165
165
```
166
166
167
-
1. Open a browser window, and go to the URL: `http://localhost:8080`. You will see the message associated with your key.
167
+
1. Open a browser window, and go to the URL: `http://localhost:8080`. You now see the message associated with your key.
168
168
169
169
You can also use *curl* to test your application, for example:
170
170
@@ -187,7 +187,7 @@ Then, open the *pom.xml* file in a text editor and add a `<dependency>` for `spr
187
187
1. Refresh the browser page twice to see the new message displayed. The first time triggers the refresh, the second loads the changes, as the first request returns using the original scope.
188
188
189
189
> [!NOTE]
190
-
> The library only checks for changes on after the refresh interval has passed. If the refresh interval hasn't passed then it will not check for changes, you will have to wait for the interval to pass then trigger the refresh check.
190
+
> The library only checks for changes on after the refresh interval has passed. If the refresh interval hasn't passed, then it doesn't check for changes. Wait for the interval to pass, then trigger the refresh check.
#Customer intent: I want to use push refresh to dynamically update my app to use the latest configuration data in App Configuration.
15
15
---
@@ -174,7 +174,7 @@ Event Grid Web Hooks require validation on creation. You can validate by followi
174
174
175
175
## Set up an event subscription
176
176
177
-
1. Open the App Configuration resource in the Azure portal, thenclick on`+ Event Subscription`in the `Events` pane.
177
+
1. Open the App Configuration resource in the Azure portal, thenselect`+ Event Subscription`in the `Events` pane.
178
178
179
179
:::image type="content" source="./media/events-pane.png" alt-text="The events pane has an option to create new Subscriptions." :::
180
180
@@ -188,9 +188,9 @@ Event Grid Web Hooks require validation on creation. You can validate by followi
188
188
189
189
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`
190
190
191
-
1. Click on`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.
191
+
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.
192
192
193
-
1. Click on`Event Subscriptions`in the `Events` pane to validate that the subscription was created successfully.
193
+
1. Select`Event Subscriptions`in the `Events` pane to validate that the subscription was created successfully.
194
194
195
195
:::image type="content" source="./media/event-subscription-view-webhook.png" alt-text="Web Hook shows up in a table on the bottom of the page." :::
Copy file name to clipboardExpand all lines: articles/azure-app-configuration/howto-convert-to-the-new-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
@@ -7,7 +7,7 @@ ms.devlang: java
7
7
author: mrm9084
8
8
ms.author: mametcal
9
9
ms.topic: how-to
10
-
ms.date: 09/27/2023
10
+
ms.date: 01/13/2024
11
11
---
12
12
13
13
# Convert to the new App Configuration library for Spring Boot
@@ -18,7 +18,7 @@ This article provides a reference on the changes and the actions needed to migra
18
18
19
19
## Group and artifact IDs changed
20
20
21
-
All of the group and artifact IDs in the Azure libraries for Spring Boot have been updated to match a new format. The new package names are:
21
+
All of the group and artifact IDs in the Azure libraries for Spring Boot are updated to match a new format. The new package names are:
22
22
23
23
### [Spring Boot 3](#tab/spring-boot-3)
24
24
@@ -153,7 +153,7 @@ public class ConfigurationClientCustomizerImpl implements ConfigurationClientCus
153
153
154
154
## Possible conflicts with Spring Cloud Azure global properties
155
155
156
-
[Spring Cloud Azure common configuration properties](/azure/developer/java/spring-framework/configuration) enable you to customize your connections to Azure services. The new App Configuration library will pick up any global or App Configuration setting that's configured with Spring Cloud Azure common configuration properties. Your connection to App Configuration will change if the configurations are set for another Spring Cloud Azure library.
156
+
[Spring Cloud Azure common configuration properties](/azure/developer/java/spring-framework/configuration) enable you to customize your connections to Azure services. The new App Configuration library picks up any global or App Configuration setting that's configured with Spring Cloud Azure common configuration properties. Your connection to App Configuration changes if the configurations are set for another Spring Cloud Azure library.
157
157
158
158
You can override this behavior by using `ConfigurationClientCustomizer`/`SecretClientCustomizer` to modify the clients.
## Availability zone support in Azure App Configuration
17
17
18
-
Azure App Configuration supports Azure availability zones to protect your application and data from single datacenter failures. All availability zone-enabled regions have a minimum of three availability zones, and each availability zone is composed of one or more datacenters equipped with independent power, cooling, and networking infrastructure. In regions where App Configuration supports availability zones, all stores have availability zones enabled by default.
18
+
Azure App Configuration supports Azure availability zones to protect your application and data from single data center failures. All availability zone-enabled regions have a minimum of three availability zones, and each availability zone is composed of one or more data centers equipped with independent power, cooling, and networking infrastructure. In regions where App Configuration supports availability zones, all stores have availability zones enabled by default.
19
19
20
20
[!INCLUDE [Azure App Configuration availability zones table](../../includes/azure-app-configuration-availability-zones.md)]
0 commit comments