-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Exchange "Produces" and "Consumes" #1772
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we get some testing for this?!
Yes, you can test it . In my project, i met a problem about this , so i debugged it and modify some codes like that, then i solved the problem. |
One of my controller is like this:
Before the modification,the request header "Accept" that feign generated is "application/json"; After the modification, it became "text/plain". |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please include a unit test covering the change
…e register of the method annotation 'RequestMapping'. And created a test case.
|
* Exchange "Produces" and "Consumes" * Added 'handleProducesAnnotation' and 'handleConsumesAnnotation' in the register of the method annotation 'RequestMapping'. And created a test case. * Reformatted the codes Co-authored-by: chengda <chengda@joysfintech.com> Co-authored-by: Marvin Froeder <velo@users.noreply.github.com>
* Exchange "Produces" and "Consumes" * Added 'handleProducesAnnotation' and 'handleConsumesAnnotation' in the register of the method annotation 'RequestMapping'. And created a test case. * Reformatted the codes Co-authored-by: chengda <chengda@joysfintech.com> Co-authored-by: Marvin Froeder <velo@users.noreply.github.com>
The annotation "ResponseBody" means that the return value of the controller method is a JSON, so it should be right to call the method "handleProducesAnnotation" .
The annotation "RequestBody" means that the parameter of the controller method is a JSON, so it should be right to call the method "handleConsumesAnnotation" .