Skip to content

Commit 0b42c66

Browse files
committed
Updating version info. Added how to use client customizers
1 parent ecb28af commit 0b42c66

6 files changed

+51
-20
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ Then, open the *pom.xml* file in a text editor and add a `<dependency>` for `spr
123123
<dependency>
124124
<groupId>com.azure.spring</groupId>
125125
<artifactId>spring-cloud-azure-appconfiguration-config-web</artifactId>
126-
<version>5.4.0</version>
126+
<version>5.8.0</version>
127127
</dependency>
128128
```
129129
@@ -133,7 +133,7 @@ Then, open the *pom.xml* file in a text editor and add a `<dependency>` for `spr
133133
<dependency>
134134
<groupId>com.azure.spring</groupId>
135135
<artifactId>spring-cloud-azure-appconfiguration-config-web</artifactId>
136-
<version>4.10.0</version>
136+
<version>4.14.0</version>
137137
</dependency>
138138
```
139139

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ In this tutorial, you learn how to:
5757
<dependency>
5858
<groupId>com.azure.spring</groupId>
5959
<artifactId>spring-cloud-azure-appconfiguration-config-web</artifactId>
60-
<version>5.4.0</version>
60+
<version>5.8.0</version>
6161
</dependency>
6262

6363
<!-- Adds the Ability to Push Refresh -->
@@ -73,7 +73,7 @@ In this tutorial, you learn how to:
7373
<dependency>
7474
<groupId>com.azure.spring</groupId>
7575
<artifactId>spring-cloud-azure-appconfiguration-config-web</artifactId>
76-
<version>4.10.0</version>
76+
<version>4.14.0</version>
7777
</dependency>
7878

7979
<!-- Adds the Ability to Push Refresh -->

articles/azure-app-configuration/howto-convert-to-the-new-spring-boot.md

Lines changed: 39 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,22 +26,22 @@ All of the group and artifact IDs in the Azure libraries for Spring Boot have be
2626
<dependency>
2727
<groupId>com.azure.spring</groupId>
2828
<artifactId>spring-cloud-azure-appconfiguration-config</artifactId>
29-
<version>5.4.0</version>
29+
<version>5.8.0</version>
3030
</dependency>
3131
<dependency>
3232
<groupId>com.azure.spring</groupId>
3333
<artifactId>spring-cloud-azure-appconfiguration-config-web</artifactId>
34-
<version>5.4.0</version>
34+
<version>5.8.0</version>
3535
</dependency>
3636
<dependency>
3737
<groupId>com.azure.spring</groupId>
3838
<artifactId>spring-cloud-azure-feature-management</artifactId>
39-
<version>5.4.0</version>
39+
<version>5.8.0</version>
4040
</dependency>
4141
<dependency>
4242
<groupId>com.azure.spring</groupId>
4343
<artifactId>spring-cloud-azure-feature-management-web</artifactId>
44-
<version>5.4.0</version>
44+
<version>5.8.0</version>
4545
</dependency>
4646
```
4747

@@ -51,22 +51,22 @@ All of the group and artifact IDs in the Azure libraries for Spring Boot have be
5151
<dependency>
5252
<groupId>com.azure.spring</groupId>
5353
<artifactId>spring-cloud-azure-appconfiguration-config</artifactId>
54-
<version>4.10.0</version>
54+
<version>4.14.0</version>
5555
</dependency>
5656
<dependency>
5757
<groupId>com.azure.spring</groupId>
5858
<artifactId>spring-cloud-azure-appconfiguration-config-web</artifactId>
59-
<version>4.10.0</version>
59+
<version>4.14.0</version>
6060
</dependency>
6161
<dependency>
6262
<groupId>com.azure.spring</groupId>
6363
<artifactId>spring-cloud-azure-feature-management</artifactId>
64-
<version>4.10.0</version>
64+
<version>4.14.0</version>
6565
</dependency>
6666
<dependency>
6767
<groupId>com.azure.spring</groupId>
6868
<artifactId>spring-cloud-azure-feature-management-web</artifactId>
69-
<version>4.10.0</version>
69+
<version>4.14.0</version>
7070
</dependency>
7171
```
7272

@@ -130,6 +130,37 @@ spring.cloud.azure.appconfiguration.stores[0].monitoring.feature-flag-refresh-in
130130

131131
The property `spring.cloud.azure.appconfiguration.stores[0].feature-flags.label` has been removed. Instead, you can use `spring.cloud.azure.appconfiguration.stores[0].feature-flags.selects[0].label-filter` to specify a label filter.
132132

133+
## Using Client Customizers
134+
135+
`ConfigurationClientCustomizer` and `SecretClientCustomizer` are used to customize the `ConfigurationClient` and `SecretClient` instances. You can use them to modify the clients before they're used to connect to App Configuration. This allows for using any credential type supported by the [Azure Identity library](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/identity/azure-identity/README.md#credential-classes). You can also modify the clients to set a custom `HttpClient` or `HttpPipeline`.
136+
137+
```java
138+
import com.azure.core.credential.TokenCredential;
139+
import com.azure.data.appconfiguration.ConfigurationClientBuilder;
140+
import com.azure.identity.AzureCliCredential;
141+
import com.azure.identity.AzureCliCredentialBuilder;
142+
import com.azure.identity.ChainedTokenCredential;
143+
import com.azure.identity.ChainedTokenCredentialBuilder;
144+
import com.azure.identity.EnvironmentCredentialBuilder;
145+
import com.azure.identity.ManagedIdentityCredential;
146+
import com.azure.identity.ManagedIdentityCredentialBuilder;
147+
import com.azure.spring.cloud.appconfiguration.config.ConfigurationClientCustomizer;
148+
149+
public class ConfigurationClientCustomizerImpl implements ConfigurationClientCustomizer {
150+
151+
@Override
152+
public void customize(ConfigurationClientBuilder builder, String endpoint) {
153+
AzureCliCredential cliCredential = new AzureCliCredentialBuilder().build();
154+
String managedIdentityClientId = System.getenv("MANAGED_IDENTITY_CLIENT_ID");
155+
ManagedIdentityCredential managedIdentityCredential = new ManagedIdentityCredentialBuilder()
156+
.clientId(managedIdentityClientId).build();
157+
ChainedTokenCredential credential = new ChainedTokenCredentialBuilder().addLast(cliCredential)
158+
.addLast(managedIdentityCredential).build();
159+
builder.credential(credential);
160+
}
161+
}
162+
```
163+
133164
## Possible conflicts with Spring Cloud Azure global properties
134165

135166
[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.

articles/azure-app-configuration/quickstart-feature-flag-spring-boot.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,12 +58,12 @@ To create a new Spring Boot project:
5858
<dependency>
5959
<groupId>com.azure.spring</groupId>
6060
<artifactId>spring-cloud-azure-appconfiguration-config-web</artifactId>
61-
<version>5.4.0</version>
61+
<version>5.8.0</version>
6262
</dependency>
6363
<dependency>
6464
<groupId>com.azure.spring</groupId>
6565
<artifactId>spring-cloud-azure-feature-management-web</artifactId>
66-
<version>5.4.0</version>
66+
<version>5.8.0</version>
6767
</dependency>
6868
<dependency>
6969
<groupId>org.springframework.boot</groupId>
@@ -77,12 +77,12 @@ To create a new Spring Boot project:
7777
<dependency>
7878
<groupId>com.azure.spring</groupId>
7979
<artifactId>spring-cloud-azure-appconfiguration-config-web</artifactId>
80-
<version>4.10.0</version>
80+
<version>4.14.0</version>
8181
</dependency>
8282
<dependency>
8383
<groupId>com.azure.spring</groupId>
8484
<artifactId>spring-cloud-azure-feature-management-web</artifactId>
85-
<version>4.10.0</version>
85+
<version>4.14.0</version>
8686
</dependency>
8787
<dependency>
8888
<groupId>org.springframework.boot</groupId>

articles/azure-app-configuration/quickstart-java-spring-app.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ To install the Spring Cloud Azure Config starter module, add the following depen
4444
<dependency>
4545
<groupId>com.azure.spring</groupId>
4646
<artifactId>spring-cloud-azure-appconfiguration-config-web</artifactId>
47-
<version>5.4.0</version>
47+
<version>5.8.0</version>
4848
</dependency>
4949
```
5050

@@ -54,7 +54,7 @@ To install the Spring Cloud Azure Config starter module, add the following depen
5454
<dependency>
5555
<groupId>com.azure.spring</groupId>
5656
<artifactId>spring-cloud-azure-appconfiguration-config-web</artifactId>
57-
<version>4.10.0</version>
57+
<version>4.14.0</version>
5858
</dependency>
5959
```
6060

articles/azure-app-configuration/use-feature-flags-spring-boot.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ The easiest way to connect your Spring Boot application to App Configuration is
5555
<dependency>
5656
<groupId>com.azure.spring</groupId>
5757
<artifactId>spring-cloud-azure-feature-management-web</artifactId>
58-
<version>5.4.0</version>
58+
<version>5.8.0</version>
5959
</dependency>
6060
```
6161

@@ -65,7 +65,7 @@ The easiest way to connect your Spring Boot application to App Configuration is
6565
<dependency>
6666
<groupId>com.azure.spring</groupId>
6767
<artifactId>spring-cloud-azure-feature-management-web</artifactId>
68-
<version>4.10.0</version>
68+
<version>4.14.0</version>
6969
</dependency>
7070
```
7171

0 commit comments

Comments
 (0)