Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refresh Not working with Azure App Configuration Spring Boot 2.6.6 #873

Closed
earthspiligrim opened this issue Feb 15, 2024 · 1 comment
Closed
Assignees

Comments

@earthspiligrim
Copy link

Hi I am facing an issue with the configuration update from Azure app Configuration while I am integrating it with my spring webflux project with the following configuration. I am sucessfully able to fetch it wile the start of the application but not able to get the update on the configuration.

Reference documentation: https://microsoft.github.io/spring-cloud-azure/docs/azure-app-configuration/2.5.0/reference/html/index.html#configuration-refresh

Java version : 11
Spring boot version: 2.6.6
azure-keyvault-secrets-spring-boot-starter: 2.3.2

My approach while integrating App Configuration with spring Webflux project.

pom.xml

<dependency>
  <groupId>com.azure.spring</groupId>
  <artifactId>azure-spring-cloud-starter-appconfiguration-config</artifactId>
  <version>2.10.0</version>
</dependency>

<!-- https://mvnrepository.com/artifact/com.azure.spring/azure-spring-cloud-appconfiguration-config-web -->
<dependency>
  <groupId>com.azure.spring</groupId>
  <artifactId>azure-spring-cloud-appconfiguration-config-web</artifactId>
  <version>2.11.0</version>
</dependency>

bootstrap.properties

spring.cloud.azure.appconfiguration.stores[0].connection-string=Endpoint=......
spring.cloud.azure.appconfiguration.name=my-appname
spring.cloud.azure.appconfiguration.stores[0].selects[0].key-filter=my-app-name
spring.cloud.azure.appconfiguration.stores[0].monitoring.triggers[0].key=sentinal
spring.cloud.azure.appconfiguration.stores[0].monitoring.triggers[0].label=stage

spring.cloud.azure.appconfiguration.stores[0].monitoring.push-notification.primary-token.name=my-token
spring.cloud.azure.appconfiguration.stores[0].monitoring.push-notification.primary-token.secret=my-secret

spring.cloud.azure.appconfiguration.refresh-interval=10s

spring.cloud.azure.feature.management.fail-fast=false

My AppConfiguration File

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.context.annotation.Configuration;
import org.springframework.stereotype.Component;


@Configuration
@Data
@ConfigurationProperties("config")
@RefreshScope
public class MyAzureAppConfig {
  private String message;

  private int coolOffPeriod;
}

I have ensured that the trigger key do exist and the token and the secret matches to that from the azure app configuraiton. However I am not able to fetch the updated configuration value from the azure app config everytime the value changes.

Can someone please help me on what I am missing here?

@mrm9084 mrm9084 self-assigned this Feb 20, 2024
@mrm9084
Copy link
Member

mrm9084 commented Feb 20, 2024

Duplicate of MicrosoftDocs/azure-docs#119868. Will track in the SDK repo as that is where the library lives.

@mrm9084 mrm9084 closed this as completed Feb 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants