Skip to content

Commit

Permalink
Use AutoConfiguration annotation instead (#64)
Browse files Browse the repository at this point in the history
Cleanup related to #58
  • Loading branch information
jimmyjames authored Oct 2, 2024
2 parents 8889e13 + 38bd530 commit b035687
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,18 @@
import dev.openfga.sdk.api.configuration.*;
import dev.openfga.sdk.errors.FgaInvalidParameterException;
import org.springframework.beans.factory.BeanCreationException;
import org.springframework.boot.autoconfigure.AutoConfiguration;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
* Configures an {@code openFgaClient} and {@code openFga} beans based
* on configuration values. The beans will only be created if the
* {@link OpenFgaClient} is present on the classpath, and the
* {@code openfga.api-url} is specified.
*/
@Configuration
@AutoConfiguration
@ConditionalOnFgaProperties
@EnableConfigurationProperties(OpenFgaProperties.class)
public class OpenFgaAutoConfiguration {
Expand Down

0 comments on commit b035687

Please sign in to comment.