I'm attempting a migration from int-http:inbound-gateway
version MVC to int-webflux:inbound-gateway
version webflux. I'm stuck on the equivalent of the attribute message-converters
in the MVC version for webflux. I have converters that are invoked in the MVC side for the return body from the inbound-gateway. Is there no body conversion for inbound-gateway in webflux?
The codec-configurer
is some level of equivalent:
<xsd:attribute name="codec-configurer" type="xsd:string">
<xsd:annotation>
<xsd:appinfo>
<tool:annotation kind="ref">
<tool:expected-type type="org.springframework.http.codec.ServerCodecConfigurer"/>
</tool:annotation>
</xsd:appinfo>
<xsd:documentation>
A 'ServerCodecConfigurer' for the request readers and response writers.
By default the 'ServerCodecConfigurer#create()' factory is used.
</xsd:documentation>
</xsd:annotation>
</xsd:attribute>
The WebFlux does not use a HttpMessageConverter
abstraction, rather it uses an HttpMessageReader
and HttpMessageWriter
pairs.
See more in docs: https://docs.spring.io/spring-integration/docs/current/reference/html/webflux.html#webflux-inbound
You can configure the
WebFluxInboundEndpoint
with a customServerCodecConfigurer
, aRequestedContentTypeResolver
, and even aReactiveAdapterRegistry
.