Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
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
7b898ff7
Commit
7b898ff7
authored
Mar 29, 2021
by
liqin
💬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug fixed
parent
3c66f801
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
5 deletions
+4
-5
LoginController.java
...n/wisenergy/web/admin/controller/app/LoginController.java
+4
-5
No files found.
wisenergy-web-admin/src/main/java/cn/wisenergy/web/admin/controller/app/LoginController.java
View file @
7b898ff7
...
@@ -33,7 +33,6 @@ import org.springframework.web.bind.annotation.*;
...
@@ -33,7 +33,6 @@ import org.springframework.web.bind.annotation.*;
import
javax.imageio.ImageIO
;
import
javax.imageio.ImageIO
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletRequest
;
import
java.awt.image.BufferedImage
;
import
java.awt.image.BufferedImage
;
import
java.io.ByteArrayOutputStream
;
import
java.io.IOException
;
import
java.io.IOException
;
import
java.io.InputStream
;
import
java.io.InputStream
;
import
java.nio.charset.StandardCharsets
;
import
java.nio.charset.StandardCharsets
;
...
@@ -169,10 +168,10 @@ public class LoginController {
...
@@ -169,10 +168,10 @@ 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
();
//
byte[] bytes = out.toByteArray();
HttpHeaders
headers
=
new
HttpHeaders
();
HttpHeaders
headers
=
new
HttpHeaders
();
headers
.
setContentType
(
MediaType
.
IMAGE_JPEG
);
headers
.
setContentType
(
MediaType
.
IMAGE_JPEG
);
...
...
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