This is an automated email from the ASF dual-hosted git repository.

liubao pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/servicecomb-java-chassis.git


The following commit(s) were added to refs/heads/master by this push:
     new ee9c3382f update readme (#4128)
ee9c3382f is described below

commit ee9c3382f9e01d63a10ae17a1d3eb762a3c4965f
Author: liubao68 <[email protected]>
AuthorDate: Mon Dec 11 21:00:20 2023 +0800

    update readme (#4128)
---
 README.md    | 74 ++++++++++++++++++++++++++++++++--------------------------
 README_ZH.md | 76 +++++++++++++++++++++++++++++++++---------------------------
 2 files changed, 83 insertions(+), 67 deletions(-)

diff --git a/README.md b/README.md
index 673d3b007..cfdb3a849 100644
--- a/README.md
+++ b/README.md
@@ -1,13 +1,19 @@
 # Java Chassis [中文](README_ZH.md) [![Maven 
Central](https://maven-badges.herokuapp.com/maven-central/org.apache.servicecomb/java-chassis-core/badge.svg)](http://search.maven.org/#search%7Cga%7C1%7Corg.apache.servicecomb)
 
[![License](https://img.shields.io/badge/license-Apache%202-4EB1BA.svg)](https://www.apache.org/licenses/LICENSE-2.0.html)
 
-Apache ServiceComb Java Chassis is a Software Development Kit (SDK) for rapid 
development of microservices in Java, providing service registration, service 
discovery, dynamic routing, and service management features
+Apache ServiceComb Java Chassis is a Software Development Kit (SDK) for rapid 
development of microservices in Java, providing service registration, service 
discovery, dynamic routing, and service management features. 
 
 # releases
 
-| Release Train | Latest Version | Compiled JDK Version | Tested JDK Version   
         |
-|---------------|----------------|----------------------|-------------------------------|
-| 2.x.x         | 2.8.3          | OpenJDK 8            | OpenJDK 8, 11, 17 | 
-| 1.x.x         | 1.3.10         | OpenJDK 8            | OpenJDK 8         |
+| Release Train | Latest Version | Compiled JDK Version | Tested JDK Version | 
Open API | Notes                    |
+|---------------|----------------|----------------------|--------------------|----------|--------------------------|
+| 3.x.x         | 3.0.0          | OpenJDK 17           | OpenJDK 17         | 
3.0.x    | Depends on Spring Boot 3 |
+| 2.x.x         | 2.8.13         | OpenJDK 8            | OpenJDK 8, 11, 17  | 
2.0.x    | Depends on Spring 5      |
+| 1.x.x         | 1.3.11         | OpenJDK 8            | OpenJDK 8          | 
2.0.x    | End of Support           |
+
+>>>NOTICE: Open API 3.0.x is not compatible with 2.0.x and Java Chassis 2.x.x 
can not 
+> work together with 3.x.x. All related consumers, providers and edge service 
need use the 3.x.x version when upgrading.
+
+>>>NOTICE: Java Chassis 1.x.x reached its end of support now after it's first 
release from 2018. 
 
 # Why use Java Chassis
 
@@ -19,11 +25,11 @@ Apache ServiceComb Java Chassis is a Software Development 
Kit (SDK) for rapid de
 - **Native support for OpenAPI**
 
   Java Chassis describes the APIs of the microservices via 
[Swagger](https://swagger.io) natively, to help
-  developers to design microservices that comply to [OpenAPI 
standard](https://swagger.io/specification/v2/).
+  developers to design microservices that comply to [OpenAPI 
standard](https://swagger.io/specification/v3/).
 
 - **Flexible develop style**
 
-  Currently Java Chassis allow developers to develop their microservice APIs 
in `SpringMVC`/`JAX-RS`/`transparent RPC` styles,
+  Java Chassis allows developers to develop their microservice APIs in 
`SpringMVC`/`JAX-RS`/`Transparent RPC` styles,
   and to send the request in `RPC`/`RestTemplate` styles. And there are three 
kind of build-in transport mode:
   `Rest over Vertx`/`Rest over Servlet`/`Highway`. All of these features can 
be combined and replaced easily,
   because they are decoupled and all based on the Swagger schema, which can 
provide high flexibility.
@@ -32,30 +38,42 @@ Apache ServiceComb Java Chassis is a Software Development 
Kit (SDK) for rapid de
 
   Java Chassis provides a lot of features for microservice governance and 
monitor.
 
-# Quick Start
+# Quick Start (Spring MVC)
 
 Provider service:
 ```java
-import org.apache.servicecomb.*;
-@RpcSchema(schemaId = "helloworld")
-public class HelloWorldProvider implements HelloWorld {
-    public String sayHello(String name) {
-        return "Hello " + name;
-    }
+@RestSchema(schemaId = "ProviderController")
+@RequestMapping(path = "/")
+public class ProviderController {
+  @GetMapping("/sayHello")
+  public String sayHello(@RequestParam("name") String name) {
+    return "Hello " + name;
+  }
 }
 ```
 
 Consumer service:
+
+Declare Provider service interface to match the Provider method signature. 
(Method name, return type, parameter name, parameter type)
+```java
+public interface ProviderService {
+  String sayHello(String name);
+}
+```
+
+Invoke Provider service with RPC
 ```java
-import org.apache.servicecomb.*;
-@Component
-public class HelloWorldConsumer  {
-       @RpcReference(microserviceName = "pojo", schemaId = "helloworld")
-       private static HelloWorld helloWorld;
-
-       public static void main(String[] args) {
-               helloWorld.sayHello("Tank");
-       }
+@RestSchema(schemaId = "ConsumerController")
+@RequestMapping(path = "/")
+public class ConsumerController {
+  @RpcReference(schemaId = "ProviderController", microserviceName = "provider")
+  private ProviderService providerService;
+
+  // consumer service which delegate the implementation to provider service.
+  @GetMapping("/sayHello")
+  public String sayHello(@RequestParam("name") String name) {
+    return providerService.sayHello(name);
+  }
 }
 ```
 
@@ -96,13 +114,3 @@ See 
[CONTRIBUTING](http://servicecomb.apache.org/developers/contributing) for de
 
 # License
 Licensed under an [Apache 2.0 license](LICENSE).
-
-# Export Notice
-
-This distribution includes cryptographic software. The country in which you 
currently reside may have restrictions on the import, possession, use, and/or 
re-export to another country, of encryption software. BEFORE using any 
encryption software, please check your country's laws, regulations and policies 
concerning the import, possession, or use, and re-export of encryption 
software, to see if this is permitted. See <http://www.wassenaar.org/> for more 
information.
-
-The Apache Software Foundation has classified this software as Export 
Commodity Control Number (ECCN) 5D002, which includes information security 
software using or performing cryptographic functions with asymmetric 
algorithms. The form and manner of this Apache Software Foundation distribution 
makes it eligible for export under the "publicly available" Section 742.15(b) 
exemption (see the BIS Export Administration Regulations, Section 742.15(b)) 
for both object code and source code.
-
-The following provides more details on the included cryptographic software:
-
-  * Vertx transport can be configured for secure communications
diff --git a/README_ZH.md b/README_ZH.md
index 19706c5e1..332534acd 100644
--- a/README_ZH.md
+++ b/README_ZH.md
@@ -12,10 +12,15 @@ Apache ServiceComb Java Chassis 给开发者提供一个快速构建微服务的
 
 # releases
 
-| 版本火车  | 最新版本   | 编译的JDK版本  | 支持的JDK版本 |
-|-------|--------|-----------|-------------------|
-| 2.x.x | 2.8.3  | OpenJDK 8 | OpenJDK 8, 11, 17 | 
-| 1.x.x | 1.3.10 | OpenJDK 8 | OpenJDK 8         |
+| 版本火车  | 最新版本   | 编译的JDK版本   | 支持的JDK版本          | Open API | 备注              
|
+|-------|--------|------------|-------------------|----------|-----------------|
+| 3.x.x | 3.0.0  | OpenJDK 17 | OpenJDK 17        | 3.0.x    | 依赖Spring Boot 3 
|
+| 2.x.x | 2.8.13 | OpenJDK 8  | OpenJDK 8, 11, 17 | 2.0.x    | 依赖Spring 5      
|
+| 1.x.x | 1.3.11 | OpenJDK 8  | OpenJDK 8         | 2.0.x    | 停止更新            
|
+
+>>>NOTICE: Open API 3.0.x 不兼容 2.0.x, 因此Java Chassis 2.x.x不能与3.x.x共存互访. 
升级3.x.x,需要将相关的消费者、提供者和边缘服务同时升级.
+
+>>>NOTICE: Java Chassis 1.x.x 第一个版本于2018发布,目前已经停止维护.
 
 # 为什么使用Java Chassis
 
@@ -25,41 +30,54 @@ Apache ServiceComb Java Chassis 给开发者提供一个快速构建微服务的
 
 - **原生支持OpenAPI**
 
-  Java Chassis 的接口开发、服务治理都基于 [Swagger](https://swagger.io) ,并通过接口语义检查,使得接口定义符合 
[OpenAPI 规范](https://swagger.io/specification/v2/). 
+  Java Chassis 的接口开发、服务治理都基于 [Swagger](https://swagger.io) ,并通过接口语义检查,使得接口定义符合 
[OpenAPI 规范](https://swagger.io/specification/v3/). 
 
 - **灵活的开发方式**
 
-  开发者可以使用 `SpringMVC`/`JAX-RS`/`transparent RPC` 任意一种方式定义服务端接口, 
并使用`RPC`/`RestTemplate` 等方式访问这些接口. 得益于Java Chassis的通信层与开发方式分离的设计,开发者可以在 `Rest 
over Vertx`/`Rest over Servlet`/`Highway`等通信模式下自由切换.
+  开发者可以使用 `SpringMVC`/`JAX-RS`/`Transparent RPC` 任意一种方式定义服务端接口, 
并使用`RPC`/`RestTemplate` 等方式访问这些接口. 得益于Java Chassis的通信层与开发方式分离的设计,开发者可以在 `Rest 
over Vertx`/`Rest over Servlet`/`Highway`等通信模式下自由切换.
 
 - **开箱即用的服务治理能力**
 
   Java Chassis 提供了大量开箱即用的服务治理能力,包括服务发现、熔断容错、负载均衡、流量控制等。
 
 
-# 快速开始
+# 快速开始 (Spring MVC)
+
+定义提供者。
+
+```java
+@RestSchema(schemaId = "ProviderController")
+@RequestMapping(path = "/")
+public class ProviderController {
+  @GetMapping("/sayHello")
+  public String sayHello(@RequestParam("name") String name) {
+    return "Hello " + name;
+  }
+}
+```
+
+定义消费者。首先定义一个接口,与需要访问的提供者的方法拥有一样的签名(方法名、返回值类型、参数名称和参数类型)。
 
-定义提供者:
 ```java
-import org.apache.servicecomb.*;
-@RpcSchema(schemaId = "helloworld")
-public class HelloWorldProvider implements HelloWorld {
-    public String sayHello(String name) {
-        return "Hello " + name;
-    }
+public interface ProviderService {
+  String sayHello(String name);
 }
 ```
 
-定义消费者:
+使用RPC方式访问提供者。 
+
 ```java
-import org.apache.servicecomb.*;
-@Component
-public class HelloWorldConsumer  {
-       @RpcReference(microserviceName = "pojo", schemaId = "helloworld")
-       private static HelloWorld helloWorld;
-
-       public static void main(String[] args) {
-               helloWorld.sayHello("Tank");
-       }
+@RestSchema(schemaId = "ConsumerController")
+@RequestMapping(path = "/")
+public class ConsumerController {
+  @RpcReference(schemaId = "ProviderController", microserviceName = "provider")
+  private ProviderService providerService;
+
+  // consumer service which delegate the implementation to provider service.
+  @GetMapping("/sayHello")
+  public String sayHello(@RequestParam("name") String name) {
+    return providerService.sayHello(name);
+  }
 }
 ```
 
@@ -97,13 +115,3 @@ public class HelloWorldConsumer  {
 
 # License
 Licensed under an [Apache 2.0 license](LICENSE).
-
-# Export Notice
-
-This distribution includes cryptographic software. The country in which you 
currently reside may have restrictions on the import, possession, use, and/or 
re-export to another country, of encryption software. BEFORE using any 
encryption software, please check your country's laws, regulations and policies 
concerning the import, possession, or use, and re-export of encryption 
software, to see if this is permitted. See <http://www.wassenaar.org/> for more 
information.
-
-The Apache Software Foundation has classified this software as Export 
Commodity Control Number (ECCN) 5D002, which includes information security 
software using or performing cryptographic functions with asymmetric 
algorithms. The form and manner of this Apache Software Foundation distribution 
makes it eligible for export under the "publicly available" Section 742.15(b) 
exemption (see the BIS Export Administration Regulations, Section 742.15(b)) 
for both object code and source code.
-
-The following provides more details on the included cryptographic software:
-
-  * Vertx transport can be configured for secure communications

Reply via email to