From 2c9bd25445166d57805add72b0f6aa33b6364cfb Mon Sep 17 00:00:00 2001 From: chentianming Date: Mon, 4 Jan 2021 17:49:03 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=87=E6=A1=A3=E5=8A=A0fastJson=E8=BD=AC?= =?UTF-8?q?=E6=8D=A2=E5=99=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 1 + README_EN.md | 1 + 2 files changed, 2 insertions(+) diff --git a/README.md b/README.md index 6184ebe..d0df745 100644 --- a/README.md +++ b/README.md @@ -708,6 +708,7 @@ retrofit: - [Wire](https://github.com/square/wire): com.squareup.Retrofit:converter-wire - [Simple XML](http://simple.sourceforge.net/): com.squareup.Retrofit:converter-simplexml - [JAXB](https://docs.oracle.com/javase/tutorial/jaxb/intro/index.html): com.squareup.retrofit2:converter-jaxb +- fastJson:com.alibaba.fastjson.support.retrofit.Retrofit2ConverterFactory `retrofit-spring-boot-starter`支持通过`retrofit.global-converter-factories`配置全局数据转换器工厂,转换器工厂实例优先从Spring容器获取,如果没有获取到,则反射创建。默认的全局数据转换器工厂是`retrofit2.converter.jackson.JacksonConverterFactory`,你可以直接通过`spring.jackson.*`配置`jackson`序列化规则,配置可参考[Customize the Jackson ObjectMapper](https://docs.spring.io/spring-boot/docs/2.1.5.RELEASE/reference/htmlsingle/#howto-customize-the-jackson-objectmapper)! diff --git a/README_EN.md b/README_EN.md index 1fd88d7..e5aaec6 100644 --- a/README_EN.md +++ b/README_EN.md @@ -696,6 +696,7 @@ For each Java interface, you can also specify the `CallAdapter.Factory` used by - [Wire](https://github.com/square/wire): com.squareup.Retrofit:converter-wire - [Simple XML](http://simple.sourceforge.net/): com.squareup.Retrofit:converter-simplexml - [JAXB](https://docs.oracle.com/javase/tutorial/jaxb/intro/index.html): com.squareup.retrofit2:converter-jaxb +- fastJson:com.alibaba.fastjson.support.retrofit.Retrofit2ConverterFactory `retrofit-spring-boot-starter` supports configuring the global `converter factory` through `retrofit.global-converter-factories`. The converter factory instance is first obtained from the Spring container. If it is not obtained, it is created by reflection. The default global data converter factory is `retrofit2.converter.jackson.JacksonConverterFactory`, you can directly configure the `jackson` serialization rules through `spring.jackson.*`, please refer to [Customize the Jackson ObjectMapper](https://docs.spring.io/spring-boot/docs/2.1.5.RELEASE/reference/htmlsingle/#howto-customize-the-jackson-objectmapper)