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

Exchange "Produces" and "Consumes" #1772

Merged
merged 6 commits into from Oct 20, 2022
Merged

Exchange "Produces" and "Consumes" #1772

merged 6 commits into from Oct 20, 2022

Conversation

chengda
Copy link
Contributor

@chengda chengda commented Sep 30, 2022

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" .

Copy link
Member

@velo velo left a 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?!

@chengda
Copy link
Contributor Author

chengda commented Oct 4, 2022

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.

@chengda
Copy link
Contributor Author

chengda commented Oct 4, 2022

Can we get some testing for this?!

One of my controller is like this:

@PostMapping(value="/test", produces="text/plain")
public String test(){
 ...
}

Before the modification,the request header "Accept" that feign generated is "application/json"; After the modification, it became "text/plain".

Copy link
Member

@velo velo left a 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

chengda added 2 commits October 13, 2022 16:49
…e register of the method annotation 'RequestMapping'. And created a test case.
@chengda
Copy link
Contributor Author

chengda commented Oct 13, 2022

Please include a unit test covering the change
Ok, it's done, please check it.

@velo velo merged commit ca761ae into OpenFeign:master Oct 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants