Skip to content
Advertisement

Tag: spring-webflux

Spring WebFlux and WebSocket

I am trying to add WebSocket functionality to an existing application which uses Spring WebFlux. It uses: Spring boot 2.2.1.RELEASE Tomcat container Configured to serve jsp pages When I try to connect to it through JavaScript (from inside a jsp page) I am receiving the error “failed: Error during WebSocket handshake: Unexpected response code: 404” I noted that if I

org.springframework.web.reactive.function.UnsupportedMediaTypeException: Content type ‘text/xml;charset=UTF-8’ not supported for bodyType

using Java 11, SpringBoot 2, WebFlux, WebClient and Jackson trying to use Spring WebClient to consume a Web service endpoint that returns XML, content type: ‘text/xml;charset=UTF-8’ Jackson XML dependency in the project’s pom.xml: WebClient code that triggers a request to external API and builds the response: ServiceResponse class (a simple POJO): resulting error: org.springframework.web.reactive.function.UnsupportedMediaTypeException: Content type ‘text/xml;charset=UTF-8’ not supported for

Backpressure mechanism in Spring Web-Flux

I’m a starter in Spring Web-Flux. I wrote a controller as follows: I know one of the reactive benefits is Backpressure, and it can balance the request or the response rate. I want to realize how to have backpressure mechanism in Spring Web-Flux. Answer Backpressure in WebFlux In order to understand how Backpressure works in the current implementation of the

Advertisement