Skip to content

Commit 1689572

Browse files
authored
Merge pull request #112085 from lisaguthrie/javaupdates
Fixes to Java docs
2 parents 208600e + ba7248b commit 1689572

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ Use the [Spring Initializr](https://start.spring.io/) to create a new Spring Boo
139139
1. Create a new file named `bootstrap.properties` under the resources directory of your app, and add the following lines to the file. Replace the sample values with the appropriate properties for your App Configuration store.
140140

141141
```CLI
142-
spring.cloud.azure.appconfiguration.stores[0].connection-string=${APP_CONFIGURATION_CONNECTION_STRING}
142+
spring.cloud.azure.appconfiguration.stores[0].connection-string= ${APP_CONFIGURATION_CONNECTION_STRING}
143143
```
144144

145145
1. Set an environment variable named **APP_CONFIGURATION_CONNECTION_STRING**, and set it to the access key to your App Configuration store. At the command line, run the following command and restart the command prompt to allow the change to take effect:

articles/azure-app-configuration/use-key-vault-references-spring-boot.md

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,14 @@ To add a secret to the vault, you need to take just a few additional steps. In t
137137
138138
## Update your code to use a Key Vault reference
139139
140+
1. Create an environment variable called **APP_CONFIGURATION_ENDPOINT**. Set its value to the endpoint for your App Configuration store. You can find the endpoint on the **Access Keys** blade in the Azure portal.
141+
142+
1. Open *bootstrap.properties* in the *resources* folder. Update this file to use the App Configuration endpoint, rather than a connection string.
143+
144+
```properties
145+
spring.cloud.azure.appconfiguration.stores[0].endpoint= ${APP_CONFIGURATION_ENDPOINT}
146+
```
147+
140148
1. Open *MessageProperties.java*. Add a new variable called *keyVaultMessage*:
141149
142150
```java
@@ -163,7 +171,7 @@ To add a secret to the vault, you need to take just a few additional steps. In t
163171
1. Create a new file called *AzureCredentials.java* and add the code below.
164172
165173
```java
166-
package com.example;
174+
package com.example.demo;
167175
168176
import com.azure.core.credential.TokenCredential;
169177
import com.azure.identity.EnvironmentCredentialBuilder;
@@ -192,7 +200,7 @@ To add a secret to the vault, you need to take just a few additional steps. In t
192200
1. Create a new file called *AppConfiguration.java*. And add the code below.
193201
194202
```java
195-
package com.example;
203+
package com.example.demo;
196204
197205
import org.springframework.context.annotation.Bean;
198206
import org.springframework.context.annotation.Configuration;
@@ -211,7 +219,7 @@ To add a secret to the vault, you need to take just a few additional steps. In t
211219
212220
```factories
213221
org.springframework.cloud.bootstrap.BootstrapConfiguration=\
214-
com.example.AppConfiguration
222+
com.example.demo.AppConfiguration
215223
```
216224
217225
1. Build your Spring Boot application with Maven and run it, for example:

0 commit comments

Comments
 (0)