Skip to content

Commit ed446e8

Browse files
Merge pull request #291409 from mrm9084/SpringAAD&Updates
Spring app config AAD and version updates
2 parents 9f12194 + 8dc3efd commit ed446e8

6 files changed

+263
-253
lines changed

articles/azure-app-configuration/enable-dynamic-configuration-java-spring-app.md

Lines changed: 10 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ author: mrm9084
77
ms.service: azure-app-configuration
88
ms.devlang: java
99
ms.topic: tutorial
10-
ms.date: 03/07/2024
10+
ms.date: 12/04/2024
1111
ms.custom: devx-track-java, devx-track-extended-java
1212
ms.author: mametcal
1313
#Customer intent: As a Java Spring developer, I want to dynamically update my app to use the latest configuration data in App Configuration.
@@ -23,7 +23,7 @@ Both libraries support manual triggering to check for refreshed configuration va
2323

2424
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.
2525

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.
2727

2828
## Use manual refresh
2929

@@ -57,9 +57,9 @@ App Configuration exposes `AppConfigurationRefresh`, which can be used to check
5757
}
5858
```
5959

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.
6161

62-
1. Update `bootstrap.properties` to enable refresh:
62+
1. To enable refresh update `bootstrap.properties`:
6363

6464
```properties
6565
spring.cloud.azure.appconfiguration.stores[0].monitoring.enabled=true
@@ -84,7 +84,7 @@ App Configuration exposes `AppConfigurationRefresh`, which can be used to check
8484
mvn spring-boot:run
8585
```
8686

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.
8888

8989
You can also use *curl* to test your application, for example:
9090

@@ -98,7 +98,7 @@ App Configuration exposes `AppConfigurationRefresh`, which can be used to check
9898
|---|---|
9999
| /application/config.message | Hello - Updated |
100100

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.
102102

103103
| Key | Value |
104104
|---|---|
@@ -115,31 +115,15 @@ To use automated refresh, start with a Spring Boot app that uses App Configurati
115115
116116
Then, open the *pom.xml* file in a text editor and add a `<dependency>` for `spring-cloud-azure-appconfiguration-config-web` using the following code.
117117
118-
**Spring Boot**
119-
120-
### [Spring Boot 3](#tab/spring-boot-3)
121-
122-
```xml
123-
<dependency>
124-
<groupId>com.azure.spring</groupId>
125-
<artifactId>spring-cloud-azure-appconfiguration-config-web</artifactId>
126-
<version>5.8.0</version>
127-
</dependency>
128-
```
129-
130-
### [Spring Boot 2](#tab/spring-boot-2)
131-
132118
```xml
133119
<dependency>
134120
<groupId>com.azure.spring</groupId>
135121
<artifactId>spring-cloud-azure-appconfiguration-config-web</artifactId>
136-
<version>4.14.0</version>
122+
<version>5.18.0</version>
137123
</dependency>
138124
```
139125
140-
---
141-
142-
1. Update `bootstrap.properties` to enable refresh
126+
1. To enable refresh update `bootstrap.properties`:
143127
144128
```properties
145129
spring.cloud.azure.appconfiguration.stores[0].monitoring.enabled=true
@@ -164,7 +148,7 @@ Then, open the *pom.xml* file in a text editor and add a `<dependency>` for `spr
164148
mvn spring-boot:run
165149
```
166150
167-
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.
168152
169153
You can also use *curl* to test your application, for example:
170154
@@ -178,7 +162,7 @@ Then, open the *pom.xml* file in a text editor and add a `<dependency>` for `spr
178162
|---|---|
179163
| /application/config.message | Hello - Updated |
180164
181-
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.
182166
183167
| Key | Value |
184168
|---|---|

0 commit comments

Comments
 (0)