-
Notifications
You must be signed in to change notification settings - Fork 478
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
#1061 - Reenable default codecs for WebFlux configuration. #1064
Conversation
Spring WebFlux now correctly handles custom codecs. This means we can stop disabling them. This change includes more test cases, verifying Spring MVC configuration for hypermedia as well, verifying both Web MVC and WebFlux are properly and consistently configured. Probably supercedes: #1047
Feedback welcome @wilkinsona. |
Thanks for the fix, @gregturn. +1 for leaving WebFlux's default codecs enabled as disabling them makes WebFlux very cumbersome to use for any endpoints that aren't using Spring HATEOAS. I am less sure about the fallback to Jackson, even if it is now consistent across MVC and WebFlux. For a request that accepts, say, I discussed this a bit with @bclozel today and he remarked that it's an interesting use case and one that Framework would like to support. It may be too late in the schedule now for Framework 5.2 and HATEOAS 1.0, but perhaps there's something that can be done without any Framework changes. |
If be curious what the basis is for the wild card matcher? Sounds like it may have been put in to catch a particular situation that is now actually an issue. |
I don't know why it was added originally, but I do know it's useful for any endpoint that returns an |
It occurred to me overnight that there have been number of Boot issues (spring-projects/spring-boot#2147 is a good starting point) related to this where users expected a request for |
I think the scope of the issue is limited because I don’t think we have a lot of people asking for, say, Collection+JSON where it wasn’t registered. Which means we can mend that in the next versions. That being said, my inclination is to remove the wildcard matcher and to instead register handlers as needed. For Boot’s Actuator, you could register one using HATEOAS’s SPI for custom media types. And when HATEOAS is NOT on the classpath, well you’d have to register that same handler directly with Spring Framework. This connects with #1052 |
I really don't think HATEOAS should do that. While we could do something in Boot's Actuator to work around the breaking change, it would also be a breaking change for any user application with similar endpoints. |
I'm not sure I'm following the whole discussion, but the
I don't think we should disable that behavior in any case. |
Since the discussion about handling |
Let's move it elsewhere please. I don't think it can be considered resolved and something probably needs to be done before 1.0 GAs and reduces the options available to fix it. |
Resolved via fd70fd9. |
Thanks @wilkinsona @bclozel for your feedback. This issue is now resolved regarding Spring HATEOAS. |
Is there a new HATEOAS issue to discuss the problems with |
Frankly, I thought that was a Framework issue to discuss. ;) |
There may be some changes needed in Framework but I think changes will also, if not exclusively, be needed in Spring HATEOAS. IMO, the problem should be tracked here until a plan of attack has been devised. At that point, a Framework issue can be opened if it's needed. |
See #1073 for the continuation of this broader topic. Whether or not this is a Framework issue or what can be found there. |
Spring WebFlux now correctly handles custom codecs. This means we can stop disabling them. This change includes more test cases, verifying Spring MVC configuration for hypermedia as well, verifying both Web MVC and WebFlux are properly and consistently configured.
Probably supercedes: #1047