Skip to content

Spring MVC REST: Support for binding Google Protocol Buffers messages [SPR-6259] #10927

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

Closed
spring-projects-issues opened this issue Oct 22, 2009 · 5 comments
Assignees
Labels
in: web Issues in web modules (web, webmvc, webflux, websocket) status: duplicate A duplicate of another issue type: enhancement A general enhancement

Comments

@spring-projects-issues
Copy link
Collaborator

spring-projects-issues commented Oct 22, 2009

Alex Antonov opened SPR-6259 and commented

Provide facility to support binding for Google Protocol Buffers messages to MVC Controller method arguments.

Code implementation to follow.


Affects: 3.0 RC1

Attachments:

Issue Links:

Referenced from: commits b56703e

2 votes, 7 watchers

@spring-projects-issues
Copy link
Collaborator Author

Alex Antonov commented

Dependency files to the ProtobufServletRequestDataBinder

@spring-projects-issues
Copy link
Collaborator Author

Alex Antonov commented

This databinder assumes that if you are trying to bind a Message instance, the entire HTTP request (GET, PUT, POST or DELETE) would be the protobuf payload.
In case of PUT/POST the request.getInputStream is used, for GET/DELETE a Base64 encoded content of the parameter-less query string.

This has been tested and used with Spring/Spring MVC 2.5.2 (seems to be behaving a bit differently in version 2.5.6 due to the changes in AnnotationMethodHandlerAdapter and ServletHandlerMethodInvoker)

@spring-projects-issues
Copy link
Collaborator Author

Tom Ziemer commented

Are there plans to incorporate this into Spring4?

@spring-projects-issues
Copy link
Collaborator Author

spring-projects-issues commented Jan 22, 2014

Rossen Stoyanchev commented

This is related to #10477, which is already scheduled for 4.1 RC1 so I'm adding this as well for consideration at the same time.

@spring-projects-issues
Copy link
Collaborator Author

spring-projects-issues commented Jul 16, 2014

Rossen Stoyanchev commented

As for 4.1 the present thinking is that the best fit for GPB support is an HttpMessageConverter. A pull request has been submitted under #10477 and is being processed. Therefore this ticket can be closed and is superseded.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: web Issues in web modules (web, webmvc, webflux, websocket) status: duplicate A duplicate of another issue type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

2 participants