Create a Azure App Configuration Store and adds a Feature Flag called Beta.
az appconfig create -n demo-store --sku standard
az appconfig feature set -n demo-store --feature Beta --yes
Get Connection String
az appconfig credential list --name demo-store
Setup Environment Variable, you will want the value from the last command with the name "Primary Read Only"
setx APP_CONFIGURATION_CONNECTION_STRING "<Your Primary Read Only Connection String>"
Restart you Command Prompt to get the new Environment Variable
Build and run the application.
mvn clean compile spring-boot:run
Go to localhost:8080
and you will see the message Message: Beta Off
Open a new cli and turn the feature flag on.
az appconfig feature enable -n demo-store --feature Beta --yes
Configuration/Feature Flags only refresh every 30s by default. Refresh localhost:8080
a few times and you will see the message Message: Beta On
Note: You will also see this in the logs.
Refresh keys changed: [feature-management.featureManagement]