Search in sources :

Example 1 with InfluxDBImpl

use of org.influxdb.impl.InfluxDBImpl in project spring-boot by spring-projects.

the class InfluxDbAutoConfiguration method influxDb.

@Bean
@ConditionalOnMissingBean
@ConditionalOnProperty("spring.influx.url")
public InfluxDB influxDb(InfluxDbProperties properties, ObjectProvider<InfluxDbOkHttpClientBuilderProvider> builder, ObjectProvider<InfluxDbCustomizer> customizers) {
    InfluxDB influxDb = new InfluxDBImpl(properties.getUrl(), properties.getUser(), properties.getPassword(), determineBuilder(builder.getIfAvailable()));
    customizers.orderedStream().forEach((customizer) -> customizer.customize(influxDb));
    return influxDb;
}
Also used : InfluxDB(org.influxdb.InfluxDB) InfluxDBImpl(org.influxdb.impl.InfluxDBImpl) ConditionalOnMissingBean(org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean) ConditionalOnMissingBean(org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean) Bean(org.springframework.context.annotation.Bean) ConditionalOnProperty(org.springframework.boot.autoconfigure.condition.ConditionalOnProperty)

Aggregations

InfluxDB (org.influxdb.InfluxDB)1 InfluxDBImpl (org.influxdb.impl.InfluxDBImpl)1 ConditionalOnMissingBean (org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean)1 ConditionalOnProperty (org.springframework.boot.autoconfigure.condition.ConditionalOnProperty)1 Bean (org.springframework.context.annotation.Bean)1