- A Java Development Kit (JDK), version 8.
- Apache Maven, version 3.0 or later.
-
To create your Azure App Configuration store, you can use:
az appconfig create --resource-group <your-resource-group> --name <name-of-your-new-store> --sku Standard
-
Create the test key in your new store:
az appconfig kv set --key /application/config.message --value testKey --name <name-of-your-new-store> --yes
-
Create monitor trigger.
az appconfig kv set --key sentinel --value 1 --name <name-of-your-new-store> --yes
This value should match the spring.cloud.azure.appconfiguration.stores[0].monitoring.triggers[0].key
value in bootstrap.properties
.
-
Build the application
mvn clean package
-
Run the application
mvn spring-boot:run
-
Go to
localhost:8080
which will display the valuetestKey
. -
Update key to new value.
az appconfig kv set --key /application/config.message --value updatedTestKey --name <name-of-your-new-store> --yes
-
Update monitor trigger, to trigger refresh.
az appconfig kv set --key sentinel --value 2 --name <name-of-your-new-store> --yes
-
Refresh page, this will trigger the refresh update.
-
After a couple seconds refresh again, this time the new value
updatedTestKey
will show.