From cad834dca4df8b7eab2173edda02d0916459404e Mon Sep 17 00:00:00 2001 From: "alexander.andriishin" Date: Tue, 28 Apr 2026 09:33:13 +0300 Subject: [PATCH] docs: migrate README.md / README.zh_CN.md to a single NRG template MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Replaces the two hand-maintained READMEs with a single README.src.md, regenerated by nrg-maven-plugin during the compile phase. Both outputs are byte-identical to the originals (modulo a 2-line auto-generated header NRG injects at the top). The Chinese filename README.zh_CN.md is produced by declaring the language as zh_CN — NRG's default output pattern ..md yields the right name directly, no override needed. --- README.md | 4 +- README.src.md | 147 ++++++++++++++++++++++++++++++++++++++++++++++++ README.zh_CN.md | 4 +- pom.xml | 20 +++++++ 4 files changed, 173 insertions(+), 2 deletions(-) create mode 100644 README.src.md diff --git a/README.md b/README.md index f59a510f35..4463fc54e9 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,5 @@ + + English | [中文](README.zh_CN.md) # tRPC-Java Framework @@ -71,4 +73,4 @@ task and let's contribute together to tRPC-Java. ## LICENSE -tRPC-Java is licensed under the [Apache License Version 2.0](LICENSE). \ No newline at end of file +tRPC-Java is licensed under the [Apache License Version 2.0](LICENSE). diff --git a/README.src.md b/README.src.md new file mode 100644 index 0000000000..ffc7662b07 --- /dev/null +++ b/README.src.md @@ -0,0 +1,147 @@ + + +English | [中文](README.zh_CN.md) + +# tRPC-Java Framework + +[![LICENSE](https://img.shields.io/badge/license-Apache--2.0-green.svg)](https://github.com/trpc-group/trpc-java/blob/master/LICENSE) +[![Releases](https://img.shields.io/github/v/release/trpc-group/trpc-java.svg?style=flat-square)](https://github.com/trpc-group/trpc-java/releases) +[![Docs](https://img.shields.io/badge/docs-latest-green)](https://github.com/trpc-group/trpc-java/tree/master/docs/) +[![Coverage](https://codecov.io/gh/trpc-group/trpc-java/graph/badge.svg?token=PCzWvpNAIk)](https://codecov.io/gh/trpc-group/trpc-java) + +tRPC-Java, as the Java language implementation of [tRPC](https://github.com/trpc-group/trpc), is a +battle-tested microservices framework that has been extensively validated in production +environments. It not only delivers high performance but also offers ease of use and testability. + +For more information, please refer to the [related documentation](#related-documentation). + +## Overall Architecture + +![Architecture](.resources/overall.png) + +tRPC-Java has the following features: + +- Works across languages +- Support multi-protocols +- Streaming RPC +- Rich plugin ecosystem +- Scalability +- Load balance +- Flow & Overload control +- Support coroutine + +## Tutorial + +### Dependency environment + +JDK 1.8.0_251+, Maven 3.6.3+ + +> Please compile tRPC-Java through `mvn -Dmaven.test.skip=true clean install`. If you want to run unit tests, you need to use JDK 8. + +### Import dependencies + +```pom + + + com.tencent.trpc + trpc-mini + 1.0.0 + + +``` + +#### Use coroutine + +It is recommended to use [Tencent Kona JDK FIBER 8](https://github.com/Tencent/TencentKona-8). For +usage examples, +see [coroutine](https://github.com/trpc-group/trpc-java-examples/tree/master/trpc-coroutine) + +

Related Documentation

+ +- [Quick start](/docs/en/1.quick_start.md) +- [Basic tutorial](/docs/en/2.basic_tutorial.md) +- [Stub code generation tool](/docs/en/3.protobuf_stub_plugin.md) +- [Configuration parameters](/docs/en/4.configuration.md) +- [More examples](https://github.com/trpc-group/trpc-java-examples) + +## How to Contribute + +If you're interested in contributing, please take a look at +the [contribution guidelines](CONTRIBUTING.md) and check +the [unassigned issues](https://github.com/trpc-group/trpc-java/issues) in the repository. Claim a +task and let's contribute together to tRPC-Java. + +## LICENSE + +tRPC-Java is licensed under the [Apache License Version 2.0](LICENSE). +[English](README.md) | 中文 + +# tRPC-Java Framework + +[![LICENSE](https://img.shields.io/badge/license-Apache--2.0-green.svg)](https://github.com/trpc-group/trpc-java/blob/master/LICENSE) +[![Releases](https://img.shields.io/github/v/release/trpc-group/trpc-java.svg?style=flat-square)](https://github.com/trpc-group/trpc-java/releases) +[![Docs](https://img.shields.io/badge/docs-latest-green)](https://github.com/trpc-group/trpc-java/tree/master/docs/) +[![Coverage](https://codecov.io/gh/trpc-group/trpc-java/graph/badge.svg?token=PCzWvpNAIk)](https://codecov.io/gh/trpc-group/trpc-java) + +tRPC-Java,作为 [tRPC](https://github.com/trpc-group/trpc) 的 Java +语言版本,是经过大规模线上业务使用验证过的微服务框架,它不仅性能高,而且易于使用和测试。 + +更多信息见:[相关文档](#相关文档) + +## 整体架构 + +![架构图](.resources/overall.png) + +tRPC-Java 具有以下特点: + +- 跨语言 +- 多通信协议 +- 流式rpc +- 丰富插件生态 +- 可扩展性 +- 负载均衡 +- 流控和过载保护 +- 支持协程 + +## 教程 + +### 依赖环境 + +JDK 1.8.0_251+, Maven 3.6.3+ + +> 请通过 `mvn -Dmaven.test.skip=true clean install` 编译tRPC-Java。如果运行单元测试需使用JDK 8执行。 + +### 引入依赖 + +```pom + + + com.tencent.trpc + trpc-mini + 1.0.0 + + +``` + +#### 使用协程 + +推荐使用 [Tencent Kona JDK FIBER 8](https://github.com/Tencent/TencentKona-8) +使用示例见[coroutine](https://github.com/trpc-group/trpc-java-examples/tree/master/trpc-coroutine) + +

相关文档

+ +- [快速上手](/docs/zh/1.quick_start.md) +- [基础教程](/docs/zh/2.basic_tutorial.md) +- [tRPC-Java桩代码生成工具](/docs/zh/3.protobuf_stub_plugin.md) +- [配置参数文档](/docs/zh/4.configuration.md) +- [各种特性的示例代码](https://github.com/trpc-group/trpc-java-examples) + +## 如何贡献 + +如果您有兴趣进行贡献,请查阅[贡献指南](CONTRIBUTING.zh_CN.md) +并检查 [issues](https://github.com/trpc-group/trpc-java/issues) +中未分配的问题。认领一个任务,让我们一起为 tRPC-Java 做出贡献。 + +## LICENSE + +tRPC-Java 使用了 [Apache 2.0](LICENSE) 许可证. diff --git a/README.zh_CN.md b/README.zh_CN.md index 2036bf21f8..17b7760feb 100644 --- a/README.zh_CN.md +++ b/README.zh_CN.md @@ -1,3 +1,5 @@ + + [English](README.md) | 中文 # tRPC-Java Framework @@ -68,4 +70,4 @@ JDK 1.8.0_251+, Maven 3.6.3+ ## LICENSE -tRPC-Java 使用了 [Apache 2.0](LICENSE) 许可证. \ No newline at end of file +tRPC-Java 使用了 [Apache 2.0](LICENSE) 许可证. diff --git a/pom.xml b/pom.xml index 446a573422..a68e622370 100644 --- a/pom.xml +++ b/pom.xml @@ -292,6 +292,26 @@ org.apache.maven.plugins maven-compiler-plugin + + com.nanolaba + nrg-maven-plugin + 1.1 + + + README.src.md + + false + + + + compile + + create-files + + + + false + org.apache.maven.plugins maven-source-plugin