All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.breuninger.boot.example.app.Feature.kt Maven / Gradle / Ivy

package com.breuninger.boot.example.app

import com.breuninger.boot.togglz.kotlin.EnumClassFeatureProvider
import org.springframework.context.annotation.Bean
import org.springframework.context.annotation.Configuration
import org.togglz.core.context.FeatureContext

enum class Feature {
  REST_PRODUCTS_FINDALL;

  fun isActive() = FeatureContext.getFeatureManager().isActive { name }
}

@Configuration
class FeatureProviderConfiguration {

  @Bean
  fun featureProvider() = EnumClassFeatureProvider(Feature::class.java)
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy