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); }