微调
This commit is contained in:
@@ -5,6 +5,7 @@ import com.njcn.influx.core.InfluxExecutor;
|
||||
import com.njcn.influx.utils.InfluxDbUtils;
|
||||
import lombok.Data;
|
||||
import org.influxdb.InfluxDB;
|
||||
import org.influxdb.InfluxDBFactory;
|
||||
import org.influxdb.impl.InfluxDBMapper;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.context.ConfigurableApplicationContext;
|
||||
@@ -42,12 +43,14 @@ public class InfluxDbConfig {
|
||||
|
||||
@Bean(name = "influxDbMapper")
|
||||
public InfluxDBMapper influxDbMapper(InfluxDB influxDb) {
|
||||
influxDb = InfluxDBFactory.connect(url, user, password,InfluxDbUtils.client);
|
||||
influxDb.setLogLevel(InfluxDB.LogLevel.BASIC);
|
||||
return new InfluxDBMapper(influxDb);
|
||||
}
|
||||
|
||||
@Bean(name = "influxDbExecutor")
|
||||
public InfluxExecutor executor(InfluxDB influxDb, InfluxDBMapper influxDbMapper) {
|
||||
influxDb = InfluxDBFactory.connect(url, user, password,InfluxDbUtils.client);
|
||||
return new InfluxExecutor(influxDb, influxDbMapper,database);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user