客户端设置license逻辑优化.

This commit is contained in:
aoshiguchen
2022-09-04 22:37:14 +08:00
parent 068b0b012e
commit d4068f5043
2 changed files with 3 additions and 3 deletions
@@ -56,7 +56,7 @@ public class LicenseObtainService implements ApplicationRunner {
private static final ScheduledExecutorService scheduledExecutor = Executors.newSingleThreadScheduledExecutor(new CustomThreadFactory("LicenseObtain"));
@Autowired
private ProxyClientRunner proxyClientRunner;
private ProxyClientService proxyClientService;
private ReentrantLock runLock = new ReentrantLock();
private Scanner scanner = new Scanner(System.in);
private volatile boolean isFirst;
@@ -89,7 +89,7 @@ public class LicenseObtainService implements ApplicationRunner {
SystemUtil.trySleep(2000);
}
String licenseKey = getLicenseKey(args);
proxyClientRunner.start(licenseKey);
proxyClientService.start(licenseKey);
}
private String getLicenseKey(String[] args) {
@@ -58,7 +58,7 @@ import java.util.Scanner;
@Slf4j
@NonIntercept
@Component
public class ProxyClientRunner {
public class ProxyClientService {
@Autowired
private ProxyConfig proxyConfig;
@Autowired("bootstrap")