Commit a0c723fd authored by linruibiao's avatar linruibiao

整改接口

parent 2ef64927
...@@ -32,6 +32,7 @@ import java.util.concurrent.TimeUnit; ...@@ -32,6 +32,7 @@ import java.util.concurrent.TimeUnit;
@Component @Component
public class InfluxService { public class InfluxService {
private static final String PORT ="8635";
@Autowired @Autowired
private InfluxdbConfig influxdbConfig; private InfluxdbConfig influxdbConfig;
...@@ -40,7 +41,7 @@ public class InfluxService { ...@@ -40,7 +41,7 @@ public class InfluxService {
@PostConstruct @PostConstruct
private void init() { private void init() {
if ("8635".equals(influxdbConfig.port)) { if (PORT.equals(influxdbConfig.port)) {
// 华为云: https + getBuilder // 华为云: https + getBuilder
influxdb = InfluxDBFactory.connect(String.format("https://%s:%s", influxdbConfig.host, influxdbConfig.port), influxdb = InfluxDBFactory.connect(String.format("https://%s:%s", influxdbConfig.host, influxdbConfig.port),
influxdbConfig.username, influxdbConfig.username,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment