Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
Jeepay
Commits
0411d035
Commit
0411d035
authored
Apr 04, 2022
by
afei
Browse files
从请求中获取参数并以+=拼接的方式,使用更为优雅的流式拼接
parent
aa16ada8
Changes
1
Hide whitespace changes
Inline
Side-by-side
jeepay-core/src/main/java/com/jeequan/jeepay/core/beans/RequestKitBean.java
View file @
0411d035
...
...
@@ -31,6 +31,7 @@ import java.io.IOException;
import
java.io.InputStreamReader
;
import
java.util.Iterator
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
/*
* 基于spring的 req 工具类
...
...
@@ -83,11 +84,7 @@ public class RequestKitBean {
String
body
=
""
;
try
{
String
str
;
while
((
str
=
request
.
getReader
().
readLine
())
!=
null
){
body
+=
str
;
}
body
=
request
.
getReader
().
lines
().
collect
(
Collectors
.
joining
(
""
));
if
(
StringUtils
.
isEmpty
(
body
))
{
return
returnObject
;
}
...
...
Write
Preview
Supports
Markdown
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