Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
熊鹏飞
/
xxljob220
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
1651c63d
authored
Jul 27, 2017
by
xuxueli
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
更新RM
parent
d1b0cdbd
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
2 deletions
xxl-job-admin/src/test/java/com/xxl/job/dao/impl/AdminApiTest.java
xxl-job-core/src/main/java/com/xxl/job/core/util/AdminApiUtil.java
xxl-job-admin/src/test/java/com/xxl/job/dao/impl/AdminApiTest.java
View file @
1651c63d
...
@@ -13,7 +13,9 @@ public class AdminApiTest {
...
@@ -13,7 +13,9 @@ public class AdminApiTest {
public
static
void
main
(
String
[]
args
)
{
public
static
void
main
(
String
[]
args
)
{
try
{
try
{
RegistryParam
registryParam
=
new
RegistryParam
(
RegistryConfig
.
RegistType
.
EXECUTOR
.
name
(),
"aaa"
,
"112312312312"
);
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
);
System
.
out
.
println
(
registryResult
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
...
...
xxl-job-core/src/main/java/com/xxl/job/core/util/AdminApiUtil.java
View file @
1651c63d
...
@@ -66,7 +66,7 @@ public class AdminApiUtil {
...
@@ -66,7 +66,7 @@ public class AdminApiUtil {
return
ReturnT
.
FAIL
;
return
ReturnT
.
FAIL
;
}
}
p
ublic
static
ReturnT
<
String
>
callApi
(
String
finalUrl
,
Object
requestObj
)
throws
Exception
{
p
rivate
static
ReturnT
<
String
>
callApi
(
String
finalUrl
,
Object
requestObj
)
throws
Exception
{
HttpPost
httpPost
=
new
HttpPost
(
finalUrl
);
HttpPost
httpPost
=
new
HttpPost
(
finalUrl
);
CloseableHttpClient
httpClient
=
HttpClients
.
createDefault
();
CloseableHttpClient
httpClient
=
HttpClients
.
createDefault
();
try
{
try
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment