Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Returning ResponseEntity from WebFlux controller method declared to return Object serialises entire response entity to response body [SPR-15785] #20340

Closed
spring-issuemaster opened this issue Jul 17, 2017 · 0 comments

Comments

Projects
None yet
2 participants
@spring-issuemaster
Copy link
Collaborator

commented Jul 17, 2017

Andy Wilkinson opened SPR-15785 and commented

Consider this method on a RestController

@RequestMapping("/")
public Object test() {
	return new ResponseEntity<String>("testing", HttpStatus.OK);
}
```java 

With Spring MVC the response is:

testing


With WebFlux the response is:

{"headers":{},"body":"testing","statusCode":"OK","statusCodeValue":200}


I'd expect to get the Spring MVC response in both cases.

Affects: 5.0 RC2

Issue Links:

  • #20287 WebFlux can't serialize "Object" return types as response body

Referenced from: commits 5690358

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.