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

RestController fails with java.lang.ClassCastException: java.lang.String cannot be cast to org.springframework.core.io.support.ResourceRegion [SPR-16932] #21471

Closed
spring-issuemaster opened this Issue Jun 11, 2018 · 2 comments

Comments

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

spring-issuemaster commented Jun 11, 2018

Torsten Werner opened SPR-16932 and commented

I have a simple @RestController implementing a method returning List<Object>. Spring 5 fails with a ClassCastException when accessing http://localhost:8080. I have created a sample project at https://github.com/torstenwerner/springwebmvcexception that reproduces the problem. Please look at the file DemoApi.java for the implementation. The web controller works with spring 4.3 and returns JSON serialized by jackson.


Affects: 5.0.6

Reference URL: https://github.com/torstenwerner/springwebmvcexception

Referenced from: commits 96eba8b, 05ff8b7

@spring-issuemaster

This comment has been minimized.

Copy link
Collaborator

spring-issuemaster commented Jun 11, 2018

Brian Clozel commented

Thanks Torsten Werner!

Your repro project was really helpful and allowed us to quickly pinpoint the issue and fix it. Right on time for the next minor release, scheduled tomorrow.

@spring-issuemaster

This comment has been minimized.

Copy link
Collaborator

spring-issuemaster commented Jun 11, 2018

Torsten Werner commented

Great news, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment