天道酬勤,学无止境

togglz

Togglz Yml/Yaml Configuration for My SpringBoot Not working

Trying to create Feature Toggles using Togglz. Made below configurations/code in my Application, bootstrap.yml: togglz: enabled: true features: FEATURE_ONE: true Feature Enum Class: public enum AppFeatures implements Feature { @Label("FEATURE_ONE") FEATURE_ONE; public boolean isActive() { return FeatureContext.getFeatureManager().isActive(this); } } My Requirement: I need to do like this, if FEATURE_ONE is configured true in yml file, then if condition, else, else has to execute.. if(AppFeatures.FEATURE_ONE.isActive()){}else{} but my expectation not happening. Though I have given true in yml

2021-06-28 00:44:35    分类:问答    yaml   togglz   spring-boot-starter