# SpringBoot-Grpc **Repository Path**: ccccggg/SpringBoot-Grpc ## Basic Information - **Project Name**: SpringBoot-Grpc - **Description**: 基于SpringBoot 3.2.2 + GraalVM JDK 17 + grpc-java 1.61.1 实现服务间Grpc通信。 - **Primary Language**: Unknown - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 1 - **Created**: 2024-02-07 - **Last Updated**: 2024-11-23 ## Categories & Tags **Categories**: Uncategorized **Tags**: Grpc, SpringBoot, Java ## README # 在 Spring Boot 应用中使用 Grpc 进行通信 ### 参考文档 * [在 Spring Boot 应用中使用 Grpc 进行通信](https://springdoc.cn/introduction-to-grpc-with-spring-boot/) * [手把手教你把gRPC集成到SpringBoot3框架中](https://www.ctyun.cn/developer/article/450336836624453) ### 常见问题 * [使用protobuf-java-format包 JsonFormat转Json部分默认值字段消失问题](https://blog.csdn.net/qq_37131913/article/details/113616072) * [解决io.grpc.StatusRuntimeException: UNIMPLEMENTED: Service](https://blog.csdn.net/yangkuo024/article/details/125041641) ### 项目简介 1、模块说明: > `Client`: Grpc客户端 > `CustomersServer`: Customer服务端 > `HelloAndAccountServer`: Hello和Account服务端 2、模块依赖如下: `CustomersServer` 和 `Client` 依赖于 `HelloAndAccountServer`,需要先启动被依赖模块; 3、启动步骤: 使用 `IntelliJ IDEA` 打开项目 => 打开右侧 `Maven` => 刷新 `Maven` 下载 `Maven` 依赖 => 找到父项目 `SpringBoot-Grpc` => 打开 `Plugins` => 找到 `protobuf` => 运行 `protobuf:compile` 和 `protobuf:compile-custom` => 运行 `src\main\java\com\cars\grpc\` 下的 `xxxApp.java` 4、其他说明: > proto编译输出目录为: `src\main\generated` > 当前项目proto已编译,可以下载完依赖直接运行。