
com.gyftedstore.currency.rates.cca.CurrencyConverterApiAutoConfiguration Maven / Gradle / Ivy
package com.gyftedstore.currency.rates.cca;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
@Configuration
@EnableConfigurationProperties({CurrencyConverterApiProperties.class})
public class CurrencyConverterApiAutoConfiguration {
@Bean
@ConditionalOnMissingBean
@ConditionalOnProperty("exchanges.currency-converter-api.api-key")
public CurrencyConverterExchange ccaExchange(CurrencyConverterApiProperties config) {
return new CurrencyConverterExchange(config);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy