Skip to content

Commit

Permalink
Merge branch 'apache:master' into dev_czd_etcd
Browse files Browse the repository at this point in the history
  • Loading branch information
SweetWuXiaoMei authored Oct 21, 2024
2 parents 93e4cc8 + 664d314 commit af6a984
Show file tree
Hide file tree
Showing 282 changed files with 483 additions and 538 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/linelint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#

name: line lint
on:
pull_request:
branches:
- master

jobs:
linelint:
timeout-minutes: 60
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: install linelint
run: cargo install linelint-cli
- name: Run linelint check
run: linelint check
2 changes: 1 addition & 1 deletion NOTICE
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Apache ServiceComb Java Chassis
Copyright 2017-2022 The Apache Software Foundation
Copyright 2017-2024 The Apache Software Foundation

This product includes software developed at
The Apache Software Foundation (http://www.apache.org/).
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,19 +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 | Open API | Notes |
|----------------|----------------|----------------------|--------------------|----------|--------------------------|
| Java Chassis 3 | 3.2.1 | OpenJDK 17 | OpenJDK 17 | 3.0.x | Depends on Spring Boot 3 |
| Java Chassis 2 | 2.8.19 | OpenJDK 8 | OpenJDK 8, 11, 17 | 2.0.x | Depends on Spring 5 |
| Java Chassis 3 | 3.2.2 | OpenJDK 17 | OpenJDK 17 | 3.0.x | Depends on Spring Boot 3 |
| Java Chassis 2 | 2.8.20 | OpenJDK 8 | OpenJDK 8, 11, 17 | 2.0.x | Depends on Spring 5 |
| Java Chassis 1 | 1.3.11 | OpenJDK 8 | OpenJDK 8 | 2.0.x | End of Support |

>>>NOTICE: Since Open API 3.0.x is not compatible with 2.0.x, Java Chassis 2 and Java Chassis 1 can not
>>>NOTICE: Since Open API 3.0.x is not compatible with 2.0.x, Java Chassis 2 and Java Chassis 1 can not
> work together with Java Chassis 3. All related consumers, providers and edge service need use Java Chassis 3 when upgrading.
>>>NOTICE: Java Chassis 1 reached its end of support now after it's first release from 2018.
>>>NOTICE: Java Chassis 1 reached its end of support now after it's first release from 2018.
# Quick Start

Expand Down Expand Up @@ -66,7 +66,7 @@ public class ConsumerController implements ConsumerService {
}
```

Try out this example [here](https://servicecomb.apache.org/references/java-chassis/zh_CN/start/first-sample.html) .
Try out this example [here](https://servicecomb.apache.org/references/java-chassis/zh_CN/start/first-sample.html) .

# Documentation

Expand Down
10 changes: 5 additions & 5 deletions README_ZH.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Java Chassis | [English](README.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)
# Java Chassis | [English](README.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 给开发者提供一个快速构建微服务的JAVA SDK。它包含如下特性:

Expand All @@ -14,8 +14,8 @@ Apache ServiceComb Java Chassis 给开发者提供一个快速构建微服务的

| 版本火车 | 最新版本 | 编译的JDK版本 | 支持的JDK版本 | Open API | 备注 |
|----------------|--------|------------|-------------------|----------|-----------------|
| Java Chassis 3 | 3.2.1 | OpenJDK 17 | OpenJDK 17 | 3.0.x | 依赖Spring Boot 3 |
| Java Chassis 2 | 2.8.19 | OpenJDK 8 | OpenJDK 8, 11, 17 | 2.0.x | 依赖Spring 5 |
| Java Chassis 3 | 3.2.2 | OpenJDK 17 | OpenJDK 17 | 3.0.x | 依赖Spring Boot 3 |
| Java Chassis 2 | 2.8.20 | OpenJDK 8 | OpenJDK 8, 11, 17 | 2.0.x | 依赖Spring 5 |
| Java Chassis 1 | 1.3.11 | OpenJDK 8 | OpenJDK 8 | 2.0.x | 停止更新 |

>>>NOTICE: Open API 3.0.x 不兼容 2.0.x, 因此Java Chassis 2、Java Chassis 1不能与Java Chassis 3共存互访. 升级Java Chassis 3, 需要将相关的消费者、提供者和边缘服务同时升级.
Expand Down Expand Up @@ -58,7 +58,7 @@ public class ProviderServiceConfiguration {
}
```

使用RPC方式访问提供者。
使用RPC方式访问提供者。

```java
@RestSchema(schemaId = "ConsumerController", schemaInterface = ConsumerService.class)
Expand Down Expand Up @@ -87,7 +87,7 @@ public class ConsumerController implements ConsumerService {

# 编译 Java Chassis

开发者可以通过MAVEN仓库使用Java Chassis。 如果需要构建项目,需要使用JDK 17版本,并预先安装maven。
开发者可以通过MAVEN仓库使用Java Chassis。 如果需要构建项目,需要使用JDK 17版本,并预先安装maven。

mvn clean install

Expand Down
11 changes: 5 additions & 6 deletions ci/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,17 @@
see .github/workflows/checkstyle.yml

* Rat Check

see .github/workflows/rat_check.yml

* Spot Bugs

see .github/workflows/spotbugs.yml

* OWASP Dependency Check

`mvn verify -Powasp-dependency-check` . Very Slow, run manually.

* Distribution
`mvn verify -Powasp-dependency-check` . Very Slow, run manually.

`mvn clean deploy -Dcheckstyle.skip -Dspotbugs.skip=true -Dmaven.javadoc.skip=true -DskipTests -Prelease -Pdistribution` . Run manually when preparing a release.
* Distribution

`mvn clean deploy -Dcheckstyle.skip -Dspotbugs.skip=true -Dmaven.javadoc.skip=true -DskipTests -Prelease -Pdistribution` . Run manually when preparing a release.
11 changes: 5 additions & 6 deletions clients/README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
# About

This module implements common http clients for servicecomb-service-center, servicecomb-kie and other
3rd-party services.
3rd-party services.

This module is independent on servicecomb-java-chassis, and can be used in many other projects like
Spring Cloud, Dubbo, etc.

This module is independent on servicecomb-java-chassis, and can be used in many other projects like
Spring Cloud, Dubbo, etc.

# 关于

这个模块给 servicecomb-service-center, servicecomb-kie 以及其他第三方服务实现通用的 Http Client。
这个模块给 servicecomb-service-center, servicecomb-kie 以及其他第三方服务实现通用的 Http Client。

这个模块独立于 servicecomb-java-chassis, 可以用于 Spring Cloud, Dubbo 等项目。

2 changes: 1 addition & 1 deletion clients/config-common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,4 @@
</dependencies>


</project>
</project>
2 changes: 1 addition & 1 deletion clients/config-kie-client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,4 @@
</dependencies>


</project>
</project>
14 changes: 7 additions & 7 deletions clients/service-center-client/README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
## ServiceComb-Service-Center Client for Java

Sample Java client for ServiceComb-Service-Center HTTP API.
Sample Java client for ServiceComb-Service-Center HTTP API.
If you want more information about the ServiceComb-Service-Center HTTP API, go [here](https://github.com/apache/servicecomb-service-center/blob/master/docs/openapi/v4.yaml).

### Build & Install

local Build from source :
```
maven clean install
```

add dependency to maven
```
<dependency>
Expand Down Expand Up @@ -79,14 +79,14 @@ MicroservicesResponse services = client.getMicroserviceList();
for(Microservice microservice : services.getServices())
{
for (MicroserviceInstance instance: client.getMicroserviceInstanceList(microservice.getServiceId()).getInstances())
{
client.sendHeartBeats(new HeartbeatsRequest(microservice.getServiceId(),instance.getInstanceId()));
{
client.sendHeartBeats(new HeartbeatsRequest(microservice.getServiceId(),instance.getInstanceId()));
}
}
```

#### Other API
You can see client API code and tests, go [here](https://github.com/apache/servicecomb-java-chassis/blob/master/clients/service-center-client/src/main/java/org/apache/servicecomb/service/center/client/ServiceCenterClient.java)
You can see client API code and tests, go [here](https://github.com/apache/servicecomb-java-chassis/blob/master/clients/service-center-client/src/main/java/org/apache/servicecomb/service/center/client/ServiceCenterClient.java)


### More development
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@
# limitations under the License.
#

org.apache.servicecomb.common.accessLog.core.parser.impl.DefaultCompositeVertxRestAccessLogItemMeta
org.apache.servicecomb.common.accessLog.core.parser.impl.DefaultCompositeVertxRestAccessLogItemMeta
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@
#

org.apache.servicecomb.common.accessLog.core.parser.impl.TestCompositeExtendedAccessLogItemMeta
org.apache.servicecomb.common.accessLog.core.parser.impl.TestSingleExtendedAccessLogItemMeta
org.apache.servicecomb.common.accessLog.core.parser.impl.TestSingleExtendedAccessLogItemMeta
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ public void test_springmvc_int_schema_correct() {
assertEquals("""
syntax = "proto3";
package test.int;
//@WrapProperty
message testIntRequest {
sint32 value = 1;
Expand All @@ -129,7 +129,7 @@ public void test_springmvc_int_schema_correct() {
assertEquals("""
syntax = "proto3";
package test.int;
//@WrapProperty
message testIntResponse {
sint32 value = 1;
Expand All @@ -152,12 +152,12 @@ public void test_springmvc_model_schema_correct() {
assertEquals("""
syntax = "proto3";
package test.model;
message Model {
string name = 1;
sint32 age = 2;
}
//@WrapProperty
message testModelRequest {
Model value = 1;
Expand All @@ -173,12 +173,12 @@ public void test_springmvc_model_schema_correct() {
assertEquals("""
syntax = "proto3";
package test.model;
message Model {
string name = 1;
sint32 age = 2;
}
//@WrapProperty
message testIntResponse {
Model value = 1;
Expand All @@ -199,48 +199,48 @@ public void testNestedModelCorrect() {
assertEquals("""
syntax = "proto3";
package test.model;
//@WrapProperty
message MapString {
map<string, string> value = 1;
}
//@WrapProperty
message ListListString {
repeated ListString value = 1;
}
//@WrapProperty
message ListString {
repeated string value = 1;
}
message ScoreInfo {
sint32 type = 1;
}
message DeptInfo {
string name = 1;
string code = 2;
repeated ScoreInfo scores = 3;
}
message UserInfo {
repeated DeptInfo subDeptInfos = 1;
repeated MapString extraInfos = 2;
repeated ListListString nestedLists = 3;
}
//@WrapProperty
message ListScoreInfo {
repeated ScoreInfo value = 1;
}
//@WrapProperty
message ListDeptInfo {
repeated DeptInfo value = 1;
}
//@WrapProperty
message request {
UserInfo value = 1;
Expand All @@ -261,27 +261,27 @@ public void testListMapTypeCorrect() {
assertEquals("""
syntax = "proto3";
package test.model;
message ScoreInfo {
sint32 type = 1;
}
message DeptInfo {
string name = 1;
string code = 2;
repeated ScoreInfo scores = 3;
}
//@WrapProperty
message ListScoreInfo {
repeated ScoreInfo value = 1;
}
//@WrapProperty
message ListDeptInfo {
repeated DeptInfo value = 1;
}
//@WrapProperty
message request {
repeated DeptInfo value = 1;
Expand Down
4 changes: 2 additions & 2 deletions common/common-protobuf/src/test/proto/ModelProtobuf.proto
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@
# limitations under the License.
#

org.apache.servicecomb.foundation.common.utils.json.PartModule
org.apache.servicecomb.foundation.common.utils.json.PartModule
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@
#

org.apache.servicecomb.common.rest.codec.produce.ProduceJsonProcessor
org.apache.servicecomb.common.rest.codec.produce.ProduceTextPlainProcessor
org.apache.servicecomb.common.rest.codec.produce.ProduceTextPlainProcessor
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@
# limitations under the License.
#

org.apache.servicecomb.common.rest.filter.RestFilterProvider
org.apache.servicecomb.common.rest.filter.RestFilterProvider
Loading

0 comments on commit af6a984

Please sign in to comment.