v1.8.2
xuxueli 7 years ago
parent d1b0cdbda9
commit 1651c63d80

@ -13,7 +13,9 @@ public class AdminApiTest {
public static void main(String[] args) {
try {
RegistryParam registryParam = new RegistryParam(RegistryConfig.RegistType.EXECUTOR.name(), "aaa", "112312312312");
ReturnT<String> registryResult = AdminApiUtil.callApi("http://localhost:8080/xxl-job-admin"+AdminApiUtil.REGISTRY, registryParam);
AdminApiUtil.init("http://localhost:8080/xxl-job-admin");
ReturnT<String> registryResult = AdminApiUtil.callApiFailover(AdminApiUtil.REGISTRY, registryParam);
System.out.println(registryResult);
} catch (Exception e) {
e.printStackTrace();

@ -66,7 +66,7 @@ public class AdminApiUtil {
return ReturnT.FAIL;
}
public static ReturnT<String> callApi(String finalUrl, Object requestObj) throws Exception {
private static ReturnT<String> callApi(String finalUrl, Object requestObj) throws Exception {
HttpPost httpPost = new HttpPost(finalUrl);
CloseableHttpClient httpClient = HttpClients.createDefault();
try {

Loading…
Cancel
Save