Skip to content

Demonstrate bodyToFlux() issue with Spring Cloud Sleuth 2.1.3

Notifications You must be signed in to change notification settings

blake-bauman/test-sleuth-body-to-flux

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sample project for demonstrating an issue with Spring Cloud Sleuth and WebClient when using bodyToFlux

Issue: spring-cloud/spring-cloud-sleuth#1443

Endpoints

Uses bodyToMono(), expected result is {"bar": "bar1"}. Works successfully.

Uses bodyToFlux(), expected result is [{"bar": "bar1",{"bar": "bar2"}]. Actual result is:

[{"nativeBuffer":{"direct":false,"readOnly":false,"readable":true,"writable":true},"allocated":true}]

Uses bodyToFlux() and a map. Expected result is bar1bar2. Actual result is a 500 internal error. Server throws:

java.lang.ClassCastException: class org.springframework.core.io.buffer.NettyDataBuffer cannot be cast to class com.example.demo.DemoApplication$Foo

Performing either of the following yields the expected results for all endpoints:

  • Reduce Sleuth version from 2.1.3 to 2.1.2
  • Remove Spring Cloud Sleuth dependency, re-build, and re-test.

(Not a contribution)

About

Demonstrate bodyToFlux() issue with Spring Cloud Sleuth 2.1.3

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages