修改json序列化配置bug
This commit is contained in:
parent
b6c89e3857
commit
5658ef7ad7
@ -24,8 +24,7 @@ public class JsonConfig implements ApplicationRunner {
|
|||||||
@Bean
|
@Bean
|
||||||
public HttpMessageConverters fastJsonHttpMessageConverters() {
|
public HttpMessageConverters fastJsonHttpMessageConverters() {
|
||||||
FastJsonHttpMessageConverter converter = new FastJsonHttpMessageConverter();
|
FastJsonHttpMessageConverter converter = new FastJsonHttpMessageConverter();
|
||||||
converter.getFastJsonConfig().setWriterFeatures(Feature.WriteByteArrayAsBase64);
|
converter.getFastJsonConfig().setWriterFeatures(Feature.WriteByteArrayAsBase64, Feature.WriteEnumsUsingName);
|
||||||
converter.getFastJsonConfig().setWriterFeatures(Feature.WriteEnumsUsingName);
|
|
||||||
converter.getFastJsonConfig().setReaderFeatures(JSONReader.Feature.Base64StringAsByteArray);
|
converter.getFastJsonConfig().setReaderFeatures(JSONReader.Feature.Base64StringAsByteArray);
|
||||||
return new HttpMessageConverters(converter);
|
return new HttpMessageConverters(converter);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user