Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
J
jiwei-api
Project
Project
Details
Activity
Releases
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
马天浩
jiwei-api
Commits
4faf818e
Commit
4faf818e
authored
Aug 28, 2020
by
matianhao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[审管办接口] <update> 设置响应头content-type为application/json
parent
485c1341
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletion
+6
-1
SgbController.java
.../java/com/mth/requestsecret/controller/SgbController.java
+6
-1
No files found.
src/main/java/com/mth/requestsecret/controller/SgbController.java
View file @
4faf818e
...
@@ -11,7 +11,9 @@ import org.dom4j.io.SAXReader;
...
@@ -11,7 +11,9 @@ import org.dom4j.io.SAXReader;
import
org.json.JSONObject
;
import
org.json.JSONObject
;
import
org.json.XML
;
import
org.json.XML
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.http.HttpHeaders
;
import
org.springframework.http.HttpStatus
;
import
org.springframework.http.HttpStatus
;
import
org.springframework.http.MediaType
;
import
org.springframework.http.ResponseEntity
;
import
org.springframework.http.ResponseEntity
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.RestController
;
...
@@ -261,7 +263,10 @@ public class SgbController {
...
@@ -261,7 +263,10 @@ public class SgbController {
// 返回json信息
// 返回json信息
jsonResult
.
put
(
"success"
,
true
);
jsonResult
.
put
(
"success"
,
true
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
jsonResult
.
toString
());
return
ResponseEntity
.
status
(
HttpStatus
.
OK
)
.
header
(
HttpHeaders
.
CONTENT_TYPE
,
MediaType
.
APPLICATION_JSON_VALUE
)
.
body
(
jsonResult
.
toString
());
}
}
/**
/**
...
...
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