I am trying to integrate azure app configuration with feature flagging and have added additional filter for targeted users and groups on my azure portal.
I am using below dependency:
implementation ('com.azure.spring:spring-cloud-azure-feature-management-web:5.2.0')
Have created a TargetingContextAccessorImpl class like this:
public class TargetingContextAccessorImpl implements TargetingContextAccessor {
@Override
public void configureTargetingContext(TargetingContext context) {
context.setUserId("charu.test@gmail.com");
ArrayList<String> groups = new ArrayList<String>();
groups.add("abc.com");
context.setGroups(groups);
}
}
Also i have created a feature flag with targetting filter on azure portal:
And my controller looks like:
@GetMapping("/fftest")
public String test() {
if (Boolean.TRUE.equals(featureManager.isEnabledAsync("feature-a").block())) {
return "enabled";
}
return "disabled";
}
Now on running my application i am getting:
Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'Microsoft.Targeting' available
I am following this document: https://learn.microsoft.com/en-us/java/api/overview/azure/spring-cloud-feature-management-readme?view=azure-java-stable
Can anyone help with the above error log. Their is v.less information available online for Targetting.