Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
X
xxl-job
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
刘晓滨
xxl-job
Commits
ba5ae75f
Commit
ba5ae75f
authored
Dec 04, 2018
by
陈烨
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改pom.xml
parent
e5224acf
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
14 deletions
+2
-14
pom.xml
xxl-job-core/pom.xml
+0
-8
HttpClientUtil.java
...e/src/main/java/com/xxl/job/core/util/HttpClientUtil.java
+2
-6
No files found.
xxl-job-core/pom.xml
View file @
ba5ae75f
...
...
@@ -57,13 +57,6 @@
<artifactId>
httpclient
</artifactId>
<version>
4.5.6
</version>
</dependency>
<dependency>
<groupId>
org.slf4j
</groupId>
<artifactId>
slf4j-nop
</artifactId>
<version>
1.7.2
</version>
</dependency>
</dependencies>
</project>
\ No newline at end of file
xxl-job-core/src/main/java/com/xxl/job/core/util/HttpClientUtil.java
View file @
ba5ae75f
...
...
@@ -20,13 +20,9 @@ import org.apache.http.impl.client.CloseableHttpClient;
import
org.apache.http.impl.client.HttpClients
;
import
org.apache.http.impl.conn.PoolingHttpClientConnectionManager
;
import
org.apache.http.message.BasicNameValuePair
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
public
class
HttpClientUtil
{
private
static
Logger
logger
=
LoggerFactory
.
getLogger
(
HttpClientUtil
.
class
);
public
static
UrlEncodedFormEntity
getPostParam
(
Map
<
String
,
String
>
param
)
throws
UnsupportedEncodingException
{
List
<
NameValuePair
>
params
=
getReqParamNVP
(
param
);
// 编码格式转换
...
...
@@ -94,11 +90,11 @@ public class HttpClientUtil {
}
}
catch
(
java
.
net
.
ConnectException
e
)
{
logger
.
error
(
"网络异常:url="
+
url
+
" 错误消息:"
+
e
.
getMessage
());
//
logger.error("网络异常:url=" + url + " 错误消息:" + e.getMessage());
// e.printStackTrace();
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
logger
.
error
(
e
.
getMessage
()
+
" URL="
+
url
);
//
logger.error(e.getMessage() + " URL=" + url);
// e.printStackTrace();
}
finally
{
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