Skip to content

Commit aa74001

Browse files
authored
Merge pull request #125467 from mervynmanilall/add-yaml-file
Update quickstart-feature-flag-spring-boot.md
2 parents 75e0162 + 815a69c commit aa74001

File tree

1 file changed

+29
-3
lines changed

1 file changed

+29
-3
lines changed

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

Lines changed: 29 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,15 +85,28 @@ To create a new Spring Boot project:
8585
## Connect to an App Configuration store
8686

8787

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 the `bootstrap.properties` or `bootstrap.yaml` file. If the file does not exist, create it. Add the following line to the file.
8989

9090
### [Microsoft Entra ID (recommended)](#tab/entra-id)
9191
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:
9292

93-
```properties
93+
If you are using a properties file, use the following code:
94+
```properties
9495
spring.cloud.azure.appconfiguration.stores[0].endpoint= ${APP_CONFIGURATION_ENDPOINT}
9596
spring.cloud.azure.appconfiguration.stores[0].feature-flags.enabled=true
9697
```
98+
99+
If you are using a yaml file, use the following code:
100+
```yaml
101+
spring:
102+
cloud:
103+
azure:
104+
appconfiguration:
105+
stores[0]:
106+
feature-flags:
107+
enabled: 'true'
108+
connection-string: ${APP_CONFIGURATION_CONNECTION_STRING}
109+
```
97110

98111
Additionally, you need to add the following code to your project, unless you want to use Managed Identity:
99112

@@ -122,10 +135,23 @@ To create a new Spring Boot project:
122135
```
123136

124137
### [Connection string](#tab/connection-string)
125-
```properties
138+
If you are using a properties file, use the following code:
139+
```properties
126140
spring.cloud.azure.appconfiguration.stores[0].endpoint= ${APP_CONFIGURATION_CONNECTION_STRING}
127141
spring.cloud.azure.appconfiguration.stores[0].feature-flags.enabled=true
128142
```
143+
144+
If you are using a yaml file, use the following code:
145+
```yaml
146+
spring:
147+
cloud:
148+
azure:
149+
appconfiguration:
150+
stores[0]:
151+
feature-flags:
152+
enabled: 'true'
153+
connection-string: ${APP_CONFIGURATION_CONNECTION_STRING}
154+
```
129155
---
130156

131157
1. Set an environment variable.

0 commit comments

Comments
 (0)