From 5658ef7ad7cec8b6aa7156d08f18a321aa629c69 Mon Sep 17 00:00:00 2001 From: joylink_zhangsai <1021828630@qq.com> Date: Wed, 26 Jul 2023 14:32:00 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9json=E5=BA=8F=E5=88=97?= =?UTF-8?q?=E5=8C=96=E9=85=8D=E7=BD=AEbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/club/joylink/xiannccda/configuration/JsonConfig.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/main/java/club/joylink/xiannccda/configuration/JsonConfig.java b/src/main/java/club/joylink/xiannccda/configuration/JsonConfig.java index 76f591a..b1894b5 100644 --- a/src/main/java/club/joylink/xiannccda/configuration/JsonConfig.java +++ b/src/main/java/club/joylink/xiannccda/configuration/JsonConfig.java @@ -24,8 +24,7 @@ public class JsonConfig implements ApplicationRunner { @Bean public HttpMessageConverters fastJsonHttpMessageConverters() { FastJsonHttpMessageConverter converter = new FastJsonHttpMessageConverter(); - converter.getFastJsonConfig().setWriterFeatures(Feature.WriteByteArrayAsBase64); - converter.getFastJsonConfig().setWriterFeatures(Feature.WriteEnumsUsingName); + converter.getFastJsonConfig().setWriterFeatures(Feature.WriteByteArrayAsBase64, Feature.WriteEnumsUsingName); converter.getFastJsonConfig().setReaderFeatures(JSONReader.Feature.Base64StringAsByteArray); return new HttpMessageConverters(converter); }