grpc-ecosystem / grpc-spring

Spring Boot starter module for gRPC framework.
https://grpc-ecosystem.github.io/grpc-spring/
Apache License 2.0
3.52k stars 826 forks source link

How to support grpc-gateway in springboot #657

Open kerwin-wang opened 2 years ago

kerwin-wang commented 2 years ago

How to support grpc-gateway in springboot? How can I do that rpc and http+json use the same port? Thank you!

ST-DDT commented 2 years ago

I assume you are referring to https://github.com/grpc-ecosystem/grpc-gateway

We are slowly working on something like this https://github.com/yidongnan/grpc-spring-boot-starter/pull/207

ST-DDT commented 2 years ago

Other than that, you can still use their standalone proxy variant as is.

kerwin-wang commented 2 years ago

Thank you for your reply。You are very niubility!

在 2022年4月22日,15:49,ST-DDT @.***> 写道:  Other than that, you can still use their standalone proxy variant as is.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.

stillya commented 1 year ago

Any updates? I want to switch my frontend to Protocol Buffers and create a gRPC gateway for all my microservices. However, I'm currently using Spring Security to implement Attribute-Based Access Control (ABAC) authorization model. This means that I have to define REST controllers where I simply call the gRPC client, which I don't think is a great solution. For every new endpoint, I have to implement a new REST controller. It would be great to have something declarative to solve this problem, like what's provided by https://github.com/grpc-ecosystem/grpc-gateway. I'm willing to contribute to this feature if you find it useful.

ST-DDT commented 1 year ago

Grpc java now offers grpc-servlet that you can use to achieve the same. There isnt direct support for that from this library, but it should be easy to do yourself in the meantime.