Skip to content

Commit cad834d

Browse files
author
alexander.andriishin
committed
docs: migrate README.md / README.zh_CN.md to a single NRG template
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 <base>.<lang>.md yields the right name directly, no override needed.
1 parent 953a3c6 commit cad834d

4 files changed

Lines changed: 173 additions & 2 deletions

File tree

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
<!-- This file was automatically generated by Nanolaba Readme Generator (NRG) 1.1 -->
2+
<!-- Visit https://github.com/nanolaba/readme-generator for details -->
13
English | [中文](README.zh_CN.md)
24

35
# tRPC-Java Framework
@@ -71,4 +73,4 @@ task and let's contribute together to tRPC-Java.
7173

7274
## LICENSE
7375

74-
tRPC-Java is licensed under the [Apache License Version 2.0](LICENSE).
76+
tRPC-Java is licensed under the [Apache License Version 2.0](LICENSE).

README.src.md

Lines changed: 147 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,147 @@
1+
<!--@nrg.languages=en,zh_CN-->
2+
<!--@nrg.defaultLanguage=en-->
3+
English | [中文](README.zh_CN.md)<!--en-->
4+
<!--en-->
5+
# tRPC-Java Framework<!--en-->
6+
<!--en-->
7+
[![LICENSE](https://img.shields.io/badge/license-Apache--2.0-green.svg)](https://github.com/trpc-group/trpc-java/blob/master/LICENSE)<!--en-->
8+
[![Releases](https://img.shields.io/github/v/release/trpc-group/trpc-java.svg?style=flat-square)](https://github.com/trpc-group/trpc-java/releases)<!--en-->
9+
[![Docs](https://img.shields.io/badge/docs-latest-green)](https://github.com/trpc-group/trpc-java/tree/master/docs/)<!--en-->
10+
[![Coverage](https://codecov.io/gh/trpc-group/trpc-java/graph/badge.svg?token=PCzWvpNAIk)](https://codecov.io/gh/trpc-group/trpc-java)<!--en-->
11+
<!--en-->
12+
tRPC-Java, as the Java language implementation of [tRPC](https://github.com/trpc-group/trpc), is a<!--en-->
13+
battle-tested microservices framework that has been extensively validated in production<!--en-->
14+
environments. It not only delivers high performance but also offers ease of use and testability.<!--en-->
15+
<!--en-->
16+
For more information, please refer to the [related documentation](#related-documentation).<!--en-->
17+
<!--en-->
18+
## Overall Architecture<!--en-->
19+
<!--en-->
20+
![Architecture](.resources/overall.png)<!--en-->
21+
<!--en-->
22+
tRPC-Java has the following features:<!--en-->
23+
<!--en-->
24+
- Works across languages<!--en-->
25+
- Support multi-protocols<!--en-->
26+
- Streaming RPC<!--en-->
27+
- Rich plugin ecosystem<!--en-->
28+
- Scalability<!--en-->
29+
- Load balance<!--en-->
30+
- Flow & Overload control<!--en-->
31+
- Support coroutine<!--en-->
32+
<!--en-->
33+
## Tutorial<!--en-->
34+
<!--en-->
35+
### Dependency environment<!--en-->
36+
<!--en-->
37+
JDK 1.8.0_251+, Maven 3.6.3+<!--en-->
38+
<!--en-->
39+
> 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.<!--en-->
40+
<!--en-->
41+
### Import dependencies<!--en-->
42+
<!--en-->
43+
```pom<!--en-->
44+
<dependencies><!--en-->
45+
<dependency><!--en-->
46+
<groupId>com.tencent.trpc</groupId><!--en-->
47+
<artifactId>trpc-mini</artifactId><!--en-->
48+
<version>1.0.0</version><!--en-->
49+
</dependency><!--en-->
50+
</dependencies><!--en-->
51+
```<!--en-->
52+
<!--en-->
53+
#### Use coroutine<!--en-->
54+
<!--en-->
55+
It is recommended to use [Tencent Kona JDK FIBER 8](https://github.com/Tencent/TencentKona-8). For<!--en-->
56+
usage examples,<!--en-->
57+
see [coroutine](https://github.com/trpc-group/trpc-java-examples/tree/master/trpc-coroutine)<!--en-->
58+
<!--en-->
59+
<h2 id="2">Related Documentation</h2><!--en-->
60+
<!--en-->
61+
- [Quick start](/docs/en/1.quick_start.md)<!--en-->
62+
- [Basic tutorial](/docs/en/2.basic_tutorial.md)<!--en-->
63+
- [Stub code generation tool](/docs/en/3.protobuf_stub_plugin.md)<!--en-->
64+
- [Configuration parameters](/docs/en/4.configuration.md)<!--en-->
65+
- [More examples](https://github.com/trpc-group/trpc-java-examples)<!--en-->
66+
<!--en-->
67+
## How to Contribute<!--en-->
68+
<!--en-->
69+
If you're interested in contributing, please take a look at<!--en-->
70+
the [contribution guidelines](CONTRIBUTING.md) and check<!--en-->
71+
the [unassigned issues](https://github.com/trpc-group/trpc-java/issues) in the repository. Claim a<!--en-->
72+
task and let's contribute together to tRPC-Java.<!--en-->
73+
<!--en-->
74+
## LICENSE<!--en-->
75+
<!--en-->
76+
tRPC-Java is licensed under the [Apache License Version 2.0](LICENSE).<!--en-->
77+
[English](README.md) | 中文<!--zh_CN-->
78+
<!--zh_CN-->
79+
# tRPC-Java Framework<!--zh_CN-->
80+
<!--zh_CN-->
81+
[![LICENSE](https://img.shields.io/badge/license-Apache--2.0-green.svg)](https://github.com/trpc-group/trpc-java/blob/master/LICENSE)<!--zh_CN-->
82+
[![Releases](https://img.shields.io/github/v/release/trpc-group/trpc-java.svg?style=flat-square)](https://github.com/trpc-group/trpc-java/releases)<!--zh_CN-->
83+
[![Docs](https://img.shields.io/badge/docs-latest-green)](https://github.com/trpc-group/trpc-java/tree/master/docs/)<!--zh_CN-->
84+
[![Coverage](https://codecov.io/gh/trpc-group/trpc-java/graph/badge.svg?token=PCzWvpNAIk)](https://codecov.io/gh/trpc-group/trpc-java)<!--zh_CN-->
85+
<!--zh_CN-->
86+
tRPC-Java,作为 [tRPC](https://github.com/trpc-group/trpc) 的 Java<!--zh_CN-->
87+
语言版本,是经过大规模线上业务使用验证过的微服务框架,它不仅性能高,而且易于使用和测试。<!--zh_CN-->
88+
<!--zh_CN-->
89+
更多信息见:[相关文档](#相关文档)<!--zh_CN-->
90+
<!--zh_CN-->
91+
## 整体架构<!--zh_CN-->
92+
<!--zh_CN-->
93+
![架构图](.resources/overall.png)<!--zh_CN-->
94+
<!--zh_CN-->
95+
tRPC-Java 具有以下特点:<!--zh_CN-->
96+
<!--zh_CN-->
97+
- 跨语言<!--zh_CN-->
98+
- 多通信协议<!--zh_CN-->
99+
- 流式rpc<!--zh_CN-->
100+
- 丰富插件生态<!--zh_CN-->
101+
- 可扩展性<!--zh_CN-->
102+
- 负载均衡<!--zh_CN-->
103+
- 流控和过载保护<!--zh_CN-->
104+
- 支持协程<!--zh_CN-->
105+
<!--zh_CN-->
106+
## 教程<!--zh_CN-->
107+
<!--zh_CN-->
108+
### 依赖环境<!--zh_CN-->
109+
<!--zh_CN-->
110+
JDK 1.8.0_251+, Maven 3.6.3+<!--zh_CN-->
111+
<!--zh_CN-->
112+
> 请通过 `mvn -Dmaven.test.skip=true clean install` 编译tRPC-Java。如果运行单元测试需使用JDK 8执行。<!--zh_CN-->
113+
<!--zh_CN-->
114+
### 引入依赖<!--zh_CN-->
115+
<!--zh_CN-->
116+
```pom<!--zh_CN-->
117+
<dependencies><!--zh_CN-->
118+
<dependency><!--zh_CN-->
119+
<groupId>com.tencent.trpc</groupId><!--zh_CN-->
120+
<artifactId>trpc-mini</artifactId><!--zh_CN-->
121+
<version>1.0.0</version><!--zh_CN-->
122+
</dependency><!--zh_CN-->
123+
</dependencies><!--zh_CN-->
124+
```<!--zh_CN-->
125+
<!--zh_CN-->
126+
#### 使用协程<!--zh_CN-->
127+
<!--zh_CN-->
128+
推荐使用 [Tencent Kona JDK FIBER 8](https://github.com/Tencent/TencentKona-8)<!--zh_CN-->
129+
使用示例见[coroutine](https://github.com/trpc-group/trpc-java-examples/tree/master/trpc-coroutine)<!--zh_CN-->
130+
<!--zh_CN-->
131+
<h2 id="2">相关文档</h2><!--zh_CN-->
132+
<!--zh_CN-->
133+
- [快速上手](/docs/zh/1.quick_start.md)<!--zh_CN-->
134+
- [基础教程](/docs/zh/2.basic_tutorial.md)<!--zh_CN-->
135+
- [tRPC-Java桩代码生成工具](/docs/zh/3.protobuf_stub_plugin.md)<!--zh_CN-->
136+
- [配置参数文档](/docs/zh/4.configuration.md)<!--zh_CN-->
137+
- [各种特性的示例代码](https://github.com/trpc-group/trpc-java-examples)<!--zh_CN-->
138+
<!--zh_CN-->
139+
## 如何贡献<!--zh_CN-->
140+
<!--zh_CN-->
141+
如果您有兴趣进行贡献,请查阅[贡献指南](CONTRIBUTING.zh_CN.md)<!--zh_CN-->
142+
并检查 [issues](https://github.com/trpc-group/trpc-java/issues)<!--zh_CN-->
143+
中未分配的问题。认领一个任务,让我们一起为 tRPC-Java 做出贡献。<!--zh_CN-->
144+
<!--zh_CN-->
145+
## LICENSE<!--zh_CN-->
146+
<!--zh_CN-->
147+
tRPC-Java 使用了 [Apache 2.0](LICENSE) 许可证.<!--zh_CN-->

README.zh_CN.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
<!-- This file was automatically generated by Nanolaba Readme Generator (NRG) 1.1 -->
2+
<!-- Visit https://github.com/nanolaba/readme-generator for details -->
13
[English](README.md) | 中文
24

35
# tRPC-Java Framework
@@ -68,4 +70,4 @@ JDK 1.8.0_251+, Maven 3.6.3+
6870

6971
## LICENSE
7072

71-
tRPC-Java 使用了 [Apache 2.0](LICENSE) 许可证.
73+
tRPC-Java 使用了 [Apache 2.0](LICENSE) 许可证.

pom.xml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -292,6 +292,26 @@
292292
<groupId>org.apache.maven.plugins</groupId>
293293
<artifactId>maven-compiler-plugin</artifactId>
294294
</plugin>
295+
<plugin>
296+
<groupId>com.nanolaba</groupId>
297+
<artifactId>nrg-maven-plugin</artifactId>
298+
<version>1.1</version>
299+
<configuration>
300+
<file>
301+
<item>README.src.md</item>
302+
</file>
303+
<check>false</check>
304+
</configuration>
305+
<executions>
306+
<execution>
307+
<phase>compile</phase>
308+
<goals>
309+
<goal>create-files</goal>
310+
</goals>
311+
</execution>
312+
</executions>
313+
<inherited>false</inherited>
314+
</plugin>
295315
<plugin>
296316
<groupId>org.apache.maven.plugins</groupId>
297317
<artifactId>maven-source-plugin</artifactId>

0 commit comments

Comments
 (0)