そのため、アプリが実行されている環境を反映することになっている環境プロパティがあります。
@Value("${environment}")
private String environmentName; //This will be set as sandbox, staging, production
また、アプリがデプロイされている環境に基づいて設定する必要がある機能フラグ(機能は「superFeature.enable」と呼ばれます)があります。
//Config file
superFeature.enable.sandbox=true
superFeature.enable.staging=false
superFeature.enable.production=false
//@Service annotated class containing call to configuration
@Value("${superFeature.enable.{environment}:false}")
private boolean isSuperFeatureEnabled;
現時点では、サンドボックス環境でアプリを実行すると、isSuperFeatureEnabled
常にfalseになります。上記のコードスニペットの構文は正しいですか?足りないものはありますか?