Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
manager
Project
Overview
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
reyun
manager
Commits
f0b8cd7f
Commit
f0b8cd7f
authored
Feb 01, 2018
by
manxiaoqiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
app排序
parent
4028c3e3
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
3 deletions
+5
-3
workspace.xml
.idea/workspace.xml
+0
-0
ContractController.java
src/main/java/common/controller/ContractController.java
+5
-3
No files found.
.idea/workspace.xml
View file @
f0b8cd7f
This diff is collapsed.
Click to expand it.
src/main/java/common/controller/ContractController.java
View file @
f0b8cd7f
...
@@ -108,9 +108,11 @@ public class ContractController {
...
@@ -108,9 +108,11 @@ public class ContractController {
e
.
printStackTrace
();
e
.
printStackTrace
();
}
}
HttpHeaders
headers
=
new
HttpHeaders
();
HttpHeaders
headers
=
new
HttpHeaders
();
response
.
setHeader
(
"filename"
,
"contract_pay.txt"
);
response
.
setHeader
(
"filename"
,
"contract_pay.csv"
);
response
.
setHeader
(
"content-disposition"
,
"attachment; filename=contract_pay.txt"
);
response
.
setHeader
(
"content-disposition"
,
"attachment; filename=contract_pay.csv"
);
response
.
setHeader
(
"Content-Type"
,
"application/octet-stream;charset=UTF-8"
);
// response.setHeader("Content-Type", "application/octet-stream;charset=UTF-8");
response
.
setHeader
(
"Content-Type"
,
"text/csv"
);
response
.
setContentType
(
"APPLICATION/OCTET-STREAM"
);
//返回文件字符串
//返回文件字符串
return
new
ResponseEntity
<
byte
[]>(
content
,
headers
,
HttpStatus
.
CREATED
);
return
new
ResponseEntity
<
byte
[]>(
content
,
headers
,
HttpStatus
.
CREATED
);
...
...
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