Skip to content

Commit 012dc86

Browse files
committed
fix configuratiion error
1 parent 27c96f7 commit 012dc86

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

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

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -59,12 +59,6 @@ To install the Spring Cloud Azure Config starter module, add the following depen
5959

6060
To use the Spring Cloud Azure Config starter to have your application communicate with the App Configuration store that you create, configure the application by using the following steps.
6161

62-
1. Configure the App Configuration store credentials in the configuration file `application.properties`.
63-
64-
```properties
65-
spring.cloud.azure.appconfiguration.stores[0].connection-string= ${APP_CONFIGURATION_CONNECTION_STRING}
66-
```
67-
6862
1. Create a new Java file named *MessageProperties.java*, and add the following lines:
6963

7064
```java
@@ -105,7 +99,7 @@ To use the Spring Cloud Azure Config starter to have your application communicat
10599
}
106100
```
107101

108-
1. In the main application Java file, add `@EnableConfigurationProperties` to enable the *MessageProperties.java* configuration class to take effect and register it with the Spring container.
102+
1. In the main application Java file, add `@EnableConfigurationProperties` to enable the *MessageProperties.java* configuration properties class to take effect and register it with the Spring container.
109103

110104
```java
111105
import org.springframework.boot.context.properties.EnableConfigurationProperties;
@@ -135,6 +129,12 @@ To use the Spring Cloud Azure Config starter to have your application communicat
135129
}
136130
```
137131

132+
1. Create a new file named `bootstrap.properties` under the resources directory of your app, and add the following line to the file.
133+
134+
```properties
135+
spring.cloud.azure.appconfiguration.stores[0].connection-string= ${APP_CONFIGURATION_CONNECTION_STRING}
136+
```
137+
138138
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:
139139

140140
```cmd

0 commit comments

Comments
 (0)