Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
C
common
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
曲欣亮
common
Commits
0b1a91de
Commit
0b1a91de
authored
Sep 19, 2021
by
张永
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
log4j
parent
86669446
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
3 deletions
+13
-3
HttpsUtil.java
src/main/java/com/egolm/common/HttpsUtil.java
+6
-0
JdbcTemplate.java
src/main/java/com/egolm/common/jdbc/JdbcTemplate.java
+7
-3
No files found.
src/main/java/com/egolm/common/HttpsUtil.java
View file @
0b1a91de
...
...
@@ -236,6 +236,12 @@ public class HttpsUtil {
}
}
}
public
static
String
doPost
(
String
url
)
{
String
result
=
HttpUtil
.
post
(
url
);
return
result
;
}
/**
* 发送有参数的POST请求,参数为json格式
*/
...
...
src/main/java/com/egolm/common/jdbc/JdbcTemplate.java
View file @
0b1a91de
...
...
@@ -18,6 +18,8 @@ import java.util.Map;
import
javax.sql.DataSource
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.dao.DataAccessException
;
import
org.springframework.jdbc.core.CallableStatementCallback
;
import
org.springframework.jdbc.core.CallableStatementCreator
;
...
...
@@ -37,6 +39,7 @@ import com.egolm.common.jdbc.exception.MustBeOneRowException;
import
com.egolm.common.jdbc.exception.QueryArgsException
;
public
class
JdbcTemplate
extends
org
.
springframework
.
jdbc
.
core
.
JdbcTemplate
{
Logger
logger_
=
LoggerFactory
.
getLogger
(
JdbcTemplate
.
class
);
protected
Dialect
dialect
;
protected
int
sql_level
=
2
;
...
...
@@ -692,9 +695,10 @@ public class JdbcTemplate extends org.springframework.jdbc.core.JdbcTemplate {
protected
void
showSql
(
String
sql
,
Object
[]
args
)
{
if
(
sql_level
==
1
)
{
logger
.
debug
(
sql
);
logger_
.
debug
(
sql
);
System
.
out
.
println
(
sql
);
}
else
if
(
sql_level
>
1
)
{
logger
.
debug
(
sql
+
" "
+
GsonUtil
.
toJson
(
args
));
logger
_
.
debug
(
sql
+
" "
+
GsonUtil
.
toJson
(
args
));
}
}
...
...
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