Browse Source

配置开始启动

xushili 2 years ago
parent
commit
52783b914f

+ 2 - 0
src/main/java/com/gyee/redis2taos/service/ReadAndWriteService.java

@@ -7,6 +7,7 @@ import com.gyee.redis2taos.timeseries.BasicTsPoint;
 import com.gyee.redis2taos.timeseries.TsDataType;
 import com.gyee.redis2taos.timeseries.TsPoint;
 import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Value;
 import org.springframework.boot.ApplicationArguments;
 import org.springframework.boot.ApplicationRunner;
 import org.springframework.boot.DefaultApplicationArguments;
@@ -37,6 +38,7 @@ public class ReadAndWriteService implements ApplicationRunner {
     private List<List<String>> boolStrll;
     private List<List<String>> douStrll;
 
+    @Value("${active:false}")
     private boolean active;
 
     @Override