| | |
| | | package com.iailab.module.data.influxdb.common.config; |
| | | |
| | | import com.iailab.framework.tenant.core.context.TenantContextHolder; |
| | | import com.influxdb.client.InfluxDBClient; |
| | | import com.influxdb.client.InfluxDBClientFactory; |
| | | import org.slf4j.Logger; |
| | |
| | | @Value("${influx-db.org}") |
| | | public String org; |
| | | |
| | | @Value("${influx-db.bucket}") |
| | | public String bucket; |
| | | /*@Value("${influx-db.bucket}") |
| | | public String bucket;*/ |
| | | |
| | | @Value("${influx-db.token}") |
| | | public String token; |
| | | |
| | | @Value("${influx-db.url}") |
| | | public String url; |
| | | |
| | | private final static String BUCKET_NAME = "bucket_"; |
| | | |
| | | private Logger logger = LoggerFactory.getLogger(getClass()); |
| | | |
| | |
| | | return client; |
| | | } |
| | | |
| | | public String getBucket() { |
| | | return BUCKET_NAME + TenantContextHolder.getRequiredTenantId(); |
| | | } |
| | | |
| | | } |