客户端设置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")); 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) {
@@ -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")