mirror of
http://git.pig4cloud.com/pig/pigx.git
synced 2026-11-08 20:49:00 +08:00
⏪ Reverting changes. 回滚代码,不能用mediatype 不能生成验证码
This commit is contained in:
1 parent
f74e338e07
commit
ddc0bc5749
1 file changed
+2
-1
@@ -48,6 +48,7 @@ import java.util.concurrent.TimeUnit;
|
||||
@Component
|
||||
@AllArgsConstructor
|
||||
public class ImageCodeHandler implements HandlerFunction<ServerResponse> {
|
||||
private static final String JPEG = "jpeg";
|
||||
private final Producer producer;
|
||||
private final RedisTemplate redisTemplate;
|
||||
|
||||
@@ -65,7 +66,7 @@ public class ImageCodeHandler implements HandlerFunction<ServerResponse> {
|
||||
// 转换流信息写出
|
||||
FastByteArrayOutputStream os = new FastByteArrayOutputStream();
|
||||
try {
|
||||
ImageIO.write(image, MediaType.IMAGE_JPEG.getType(), os);
|
||||
ImageIO.write(image, JPEG, os);
|
||||
} catch (IOException e) {
|
||||
log.error("ImageIO write err", e);
|
||||
return Mono.error(e);
|
||||
|
||||
Reference in new issue
Block a user