客户端设置license逻辑优化.
This commit is contained in:
+2
-2
@@ -56,7 +56,7 @@ public class LicenseObtainService implements ApplicationRunner {
|
|||||||
private static final ScheduledExecutorService scheduledExecutor = Executors.newSingleThreadScheduledExecutor(new CustomThreadFactory("LicenseObtain"));
|
private static final ScheduledExecutorService scheduledExecutor = Executors.newSingleThreadScheduledExecutor(new CustomThreadFactory("LicenseObtain"));
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private ProxyClientRunner proxyClientRunner;
|
private ProxyClientService proxyClientService;
|
||||||
private ReentrantLock runLock = new ReentrantLock();
|
private ReentrantLock runLock = new ReentrantLock();
|
||||||
private Scanner scanner = new Scanner(System.in);
|
private Scanner scanner = new Scanner(System.in);
|
||||||
private volatile boolean isFirst;
|
private volatile boolean isFirst;
|
||||||
@@ -89,7 +89,7 @@ public class LicenseObtainService implements ApplicationRunner {
|
|||||||
SystemUtil.trySleep(2000);
|
SystemUtil.trySleep(2000);
|
||||||
}
|
}
|
||||||
String licenseKey = getLicenseKey(args);
|
String licenseKey = getLicenseKey(args);
|
||||||
proxyClientRunner.start(licenseKey);
|
proxyClientService.start(licenseKey);
|
||||||
}
|
}
|
||||||
|
|
||||||
private String getLicenseKey(String[] args) {
|
private String getLicenseKey(String[] args) {
|
||||||
|
|||||||
+1
-1
@@ -58,7 +58,7 @@ import java.util.Scanner;
|
|||||||
@Slf4j
|
@Slf4j
|
||||||
@NonIntercept
|
@NonIntercept
|
||||||
@Component
|
@Component
|
||||||
public class ProxyClientRunner {
|
public class ProxyClientService {
|
||||||
@Autowired
|
@Autowired
|
||||||
private ProxyConfig proxyConfig;
|
private ProxyConfig proxyConfig;
|
||||||
@Autowired("bootstrap")
|
@Autowired("bootstrap")
|
||||||
Reference in New Issue
Block a user