Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
platform
/
platform-radaraccess-server
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit c630aa91
authored
Jan 30, 2024
by
杨林龙
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
添加body打印日志
1 parent
861c271b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
platform-radaraccess/src/main/java/cn/com/glsx/radaraccess/modules/controller/RadarController.java
platform-radaraccess/src/main/java/cn/com/glsx/radaraccess/modules/controller/RadarController.java
View file @
c630aa9
...
...
@@ -16,6 +16,8 @@ import org.springframework.web.bind.annotation.RestController;
import
javax.servlet.http.HttpServletRequest
;
import
java.io.BufferedReader
;
import
java.io.IOException
;
import
java.io.InputStreamReader
;
/**
* 单体应用Controller处理统一返回体
...
...
@@ -40,16 +42,15 @@ public class RadarController extends BaseController {
public
Integer
saveRadar
(
@RequestBody
RadarBO
radarBO
)
{
log
.
info
(
"radarBO==="
+
JSONUtil
.
toJsonStr
(
radarBO
));
StringBuilder
requestBody
=
new
StringBuilder
();
try
(
BufferedReader
reader
=
request
.
getReader
(
))
{
try
(
BufferedReader
reader
=
new
BufferedReader
(
new
InputStreamReader
(
request
.
getInputStream
())
))
{
String
line
;
while
((
line
=
reader
.
readLine
())
!=
null
)
{
requestBody
.
append
(
line
);
}
}
catch
(
Exception
e
)
{
}
catch
(
IO
Exception
e
)
{
// 处理异常
log
.
error
(
"saveRadar error
"
+
e
.
getMessage
(),
e
);
log
.
info
(
"读取POST数据失败
"
+
e
.
getMessage
(),
e
);
}
String
postData
=
requestBody
.
toString
();
log
.
info
(
"postData==="
+
postData
);
Integer
num
=
radarService
.
saveRadar
(
radarBO
);
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment