Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
D
data-server
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
licc
data-server
Commits
cc84242f
Commit
cc84242f
authored
Mar 12, 2021
by
liqin
💬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug fixed
parent
45122387
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
LoginController.java
...n/wisenergy/web/admin/controller/app/LoginController.java
+3
-2
No files found.
wisenergy-web-admin/src/main/java/cn/wisenergy/web/admin/controller/app/LoginController.java
View file @
cc84242f
...
@@ -149,14 +149,15 @@ public class LoginController {
...
@@ -149,14 +149,15 @@ public class LoginController {
config
.
setCharset
(
StandardCharsets
.
UTF_8
);
config
.
setCharset
(
StandardCharsets
.
UTF_8
);
config
.
setMargin
(
0
);
config
.
setMargin
(
0
);
BufferedImage
waterImage
=
QrCodeUtil
.
generate
(
regFullUrl
,
config
);
BufferedImage
waterImage
=
QrCodeUtil
.
generate
(
regFullUrl
,
config
);
byte
[]
bytes
=
ImageUtil
.
watermarkImageSimple1
(
srcImage
,
waterImage
);
//
byte[] bytes = ImageUtil.watermarkImageSimple1(srcImage, waterImage);
ByteArrayOutputStream
out
=
new
ByteArrayOutputStream
();
ByteArrayOutputStream
out
=
new
ByteArrayOutputStream
();
ImageIO
.
write
(
waterImage
,
"jpg"
,
out
);
ImageIO
.
write
(
waterImage
,
"jpg"
,
out
);
byte
[]
bytes
=
out
.
toByteArray
();
HttpHeaders
headers
=
new
HttpHeaders
();
HttpHeaders
headers
=
new
HttpHeaders
();
headers
.
setContentType
(
MediaType
.
IMAGE_JPEG
);
headers
.
setContentType
(
MediaType
.
IMAGE_JPEG
);
headers
.
setContentLength
(
bytes
.
length
);
headers
.
setContentLength
(
bytes
.
length
);
return
new
ResponseEntity
<>(
out
.
toByteArray
()
,
headers
,
HttpStatus
.
OK
);
return
new
ResponseEntity
<>(
bytes
,
headers
,
HttpStatus
.
OK
);
}
}
return
null
;
return
null
;
}
}
...
...
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