diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml
new file mode 100644
index 00000000000..185873ad02a
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/bug_report.yml
@@ -0,0 +1,33 @@
+name: Bug Report
+description: Create a report to help us improve
+title: "[BUG] - Issue Title"
+labels: bug
+
+body:
+ - type: markdown
+ attributes:
+ value: "## Describe the bug\nA clear and concise description of what the bug is."
+
+ - type: textarea
+ attributes:
+ label: Steps to Reproduce
+ description: "List the steps to reproduce the bug."
+ placeholder: "1. Go to '...'\n2. Click on '...'\n3. See error"
+
+ - type: textarea
+ attributes:
+ label: Expected Behavior
+ description: "Describe the behavior you expected to see."
+ placeholder: "A clear and concise description of what you expected to happen."
+
+ - type: input
+ attributes:
+ label: Servicecomb Version
+ description: "Please provide your Servicecomb version"
+ placeholder: "3.2.4"
+
+ - type: textarea
+ attributes:
+ label: Additional Context
+ description: "Add any other context about the problem here."
+ placeholder: "Any additional information that might help us debug the issue."
diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml
new file mode 100644
index 00000000000..16fd2512ea7
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/config.yml
@@ -0,0 +1,18 @@
+blank_issues_enabled: false
+contact_links:
+ - name: "Contact Support"
+ url: "mailto:dev@servicecomb.apache.org"
+ about: "If you need help, please contact us."
+templates:
+ - name: "Bug Report"
+ description: "Report a bug or issue."
+ filename: "bug_report.yml"
+ - name: "Feature Request"
+ description: "Request a new feature or improvement."
+ filename: "feature_request.yml"
+ - name: "Documentation Issue"
+ description: "Report an issue with documentation."
+ filename: "documentation_issue.yml"
+ - name: "Question"
+ description: "Ask a question or seek help."
+ filename: "question.yml"
diff --git a/.github/ISSUE_TEMPLATE/documentation_issue.yml b/.github/ISSUE_TEMPLATE/documentation_issue.yml
new file mode 100644
index 00000000000..94ef3490041
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/documentation_issue.yml
@@ -0,0 +1,27 @@
+name: Documentation Issue
+description: Report an issue with the documentation
+title: "[DOCUMENTATION] - Documentation Issue Title"
+labels: documentation
+
+body:
+ - type: markdown
+ attributes:
+ value: "## Describe the documentation issue\nA clear and concise description of the issue with the documentation."
+
+ - type: textarea
+ attributes:
+ label: Location in documentation
+ description: "Please provide the URL or section where the issue appears."
+ placeholder: "e.g. https://docs.example.com/section"
+
+ - type: textarea
+ attributes:
+ label: What should be changed?
+ description: "Please describe what changes or improvements should be made to the documentation."
+ placeholder: "Explain how we can improve the content."
+
+ - type: textarea
+ attributes:
+ label: Additional Context
+ description: "Provide any other context or examples here."
+ placeholder: "Additional comments or suggestions for the documentation."
diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml
new file mode 100644
index 00000000000..3a44565e0b2
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/feature_request.yml
@@ -0,0 +1,33 @@
+name: Feature Request
+description: Suggest an idea or feature for this project
+title: "[FEATURE] - Feature Title"
+labels: enhancement
+
+body:
+ - type: markdown
+ attributes:
+ value: "## Describe the feature request\nA clear and concise description of what you want to be added to the project."
+
+ - type: textarea
+ attributes:
+ label: Problem this feature would solve
+ description: "Please describe the problem or challenge you're facing."
+ placeholder: "Explain why this feature would be helpful."
+
+ - type: textarea
+ attributes:
+ label: Describe the solution
+ description: "How do you envision this feature working?"
+ placeholder: "Provide a description of how the feature would solve the problem."
+
+ - type: textarea
+ attributes:
+ label: Alternatives considered
+ description: "Have you considered other solutions or alternatives? If yes, describe them."
+ placeholder: "Provide any alternative solutions you've thought about."
+
+ - type: textarea
+ attributes:
+ label: Additional Context
+ description: "Any other context or information that might help us implement this feature."
+ placeholder: "Include any links, mockups, or additional details."
diff --git a/.github/ISSUE_TEMPLATE/question.yml b/.github/ISSUE_TEMPLATE/question.yml
new file mode 100644
index 00000000000..af3f350b518
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/question.yml
@@ -0,0 +1,27 @@
+name: General Question
+description: Ask a general question related to the project
+title: "[QUESTION] - Question Title"
+labels: question
+
+body:
+ - type: markdown
+ attributes:
+ value: "## What is your question?\nDescribe the question or issue you are facing. Be as specific as possible."
+
+ - type: textarea
+ attributes:
+ label: Steps to reproduce (if applicable)
+ description: "If your question is about a specific problem or bug, please include steps to reproduce it."
+ placeholder: "Provide steps, if applicable."
+
+ - type: textarea
+ attributes:
+ label: What have you tried so far?
+ description: "Please explain what you have already tried to resolve the issue or answer the question."
+ placeholder: "Describe the steps you've taken."
+
+ - type: textarea
+ attributes:
+ label: Additional context
+ description: "Provide any other context or information related to the question."
+ placeholder: "Include any relevant links or background information."
diff --git a/.github/dependabot.yml b/.github/dependabot.yml
new file mode 100644
index 00000000000..7f7754fc299
--- /dev/null
+++ b/.github/dependabot.yml
@@ -0,0 +1,29 @@
+#
+# 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.
+#
+version: 2
+updates:
+ - package-ecosystem: "github-actions"
+ directory: "/"
+ schedule:
+ interval: "monthly"
+ - package-ecosystem: "maven"
+ directory: "/"
+ schedule:
+ interval: "monthly"
+ open-pull-requests-limit: 20
diff --git a/.github/workflows/checkstyle.yml b/.github/workflows/checkstyle.yml
new file mode 100644
index 00000000000..3f97b9f1818
--- /dev/null
+++ b/.github/workflows/checkstyle.yml
@@ -0,0 +1,38 @@
+#
+# 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: checkstyle
+on:
+ pull_request:
+ branches:
+ - master
+
+jobs:
+ checkstyle:
+ timeout-minutes: 60
+ runs-on: ubuntu-24.04
+ steps:
+ - uses: actions/checkout@v6
+ - name: Set up jdk
+ uses: actions/setup-java@v5
+ with:
+ java-version: '17'
+ distribution: 'temurin'
+ - name: checkstyle
+ run: mvn checkstyle:check -B -Pit
diff --git a/.github/workflows/linelint.yml b/.github/workflows/linelint.yml
new file mode 100644
index 00000000000..8d5112ea3d6
--- /dev/null
+++ b/.github/workflows/linelint.yml
@@ -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-24.04
+ steps:
+ - uses: actions/checkout@v6
+ - name: install linelint
+ run: cargo install linelint-cli
+ - name: Run linelint check
+ run: linelint check
diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml
new file mode 100644
index 00000000000..24118c35c99
--- /dev/null
+++ b/.github/workflows/maven.yml
@@ -0,0 +1,52 @@
+#
+# 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: Java CI with Maven
+
+on:
+ push:
+ branches: [ master ]
+ pull_request:
+ branches: [ master ]
+
+jobs:
+ build:
+
+ timeout-minutes: 60
+ runs-on: ubuntu-24.04
+
+ steps:
+ - uses: actions/checkout@v6
+ - name: Set up jdk
+ uses: actions/setup-java@v5
+ with:
+ java-version: '17.0.8'
+ distribution: 'temurin'
+ - name: Set up Maven
+ uses: stCarolas/setup-maven@v5
+ with:
+ maven-version: 3.9.9
+ - uses: actions/cache@v5
+ with:
+ path: ~/.m2/repository
+ key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
+ restore-keys: |
+ ${{ runner.os }}-maven-
+ - name: Compilation and Installation
+ run: mvn clean verify -Dcheckstyle.skip=true -B -Pdocker -Pjacoco -Pit -Pcoverage
diff --git a/.github/workflows/rat_check.yml b/.github/workflows/rat_check.yml
new file mode 100644
index 00000000000..c2db2508fea
--- /dev/null
+++ b/.github/workflows/rat_check.yml
@@ -0,0 +1,41 @@
+#
+# 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: rat check
+on:
+ push:
+ branches:
+ - master
+ pull_request:
+ branches:
+ - master
+
+jobs:
+ rat_check:
+ timeout-minutes: 60
+ runs-on: ubuntu-24.04
+ steps:
+ - uses: actions/checkout@v6
+ - name: Set up jdk
+ uses: actions/setup-java@v5
+ with:
+ java-version: '17'
+ distribution: 'temurin'
+ - name: rat check
+ run: mvn apache-rat:check -B -Pit,release
diff --git a/.github/workflows/typo_check.yml b/.github/workflows/typo_check.yml
new file mode 100644
index 00000000000..999530a79f7
--- /dev/null
+++ b/.github/workflows/typo_check.yml
@@ -0,0 +1,38 @@
+#
+# 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: typo check
+on:
+ pull_request:
+ branches:
+ - master
+
+jobs:
+ typo-check:
+ timeout-minutes: 60
+ runs-on: ubuntu-24.04
+ steps:
+ - uses: actions/checkout@v6
+ # To run the typo check locally, you can follow these steps:
+ # 1. Install typos locally using cargo:
+ # cargo install typos-cli
+ # 2. Run the typo check with the following command:
+ # typos
+ - name: Check typos
+ uses: crate-ci/typos@v1.38.1
diff --git a/.travis.settings.xml b/.travis.settings.xml
deleted file mode 100644
index fb86b2013bd..00000000000
--- a/.travis.settings.xml
+++ /dev/null
@@ -1,42 +0,0 @@
-
-
-
-
-
- apache.snapshots.https
- ${env.SONATYPE_USERNAME}
- ${env.SONATYPE_PASSWORD}
-
-
- apache.releases.https
- ${env.SONATYPE_USERNAME}
- ${env.SONATYPE_PASSWORD}
-
-
-
-
- passphrase
-
- /home/travis/build/apache/incubator-servicecomb-java-chassis
- 2DE9D2F9
- ${MYPASSP}
-
-
-
-
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index 6c5fdcda6ed..00000000000
--- a/.travis.yml
+++ /dev/null
@@ -1,15 +0,0 @@
-sudo: required
-language: java
-jdk:
-- openjdk8
-services:
-- docker
-cache:
- directories:
- - "$HOME/.m2"
-install: true
-jobs:
- include:
- - stage: Compilation and Installation
- script: scripts/travis.sh install
-
diff --git a/.typos.toml b/.typos.toml
new file mode 100644
index 00000000000..e8b6eb33f39
--- /dev/null
+++ b/.typos.toml
@@ -0,0 +1,38 @@
+#
+# 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.
+#
+
+[default.extend-words]
+"fo" = "fo"
+"VERTX" = "VERTX"
+"Vertx" = "Vertx"
+"vertx" = "vertx"
+
+[files]
+extend-exclude = [
+ "**/cobertura.ser"
+]
+[default]
+extend-ignore-words-re = [
+ "Verticle",
+ "verticle",
+ "VERTICLE",
+ "Prelease",
+ "cobertura",
+ "ser",
+]
diff --git a/LICENSE b/LICENSE
index 521832a32a7..7898c758729 100644
--- a/LICENSE
+++ b/LICENSE
@@ -222,12 +222,6 @@ For swagger/swagger-generator/generator-core/src/main/java/org/apache/servicecom
This product bundles files from swagger which is licensed under the Apache License v2.
For details, see https://github.com/swagger-api/swagger-core
-================================================================
-For handlers/handler-bizkeeper/src/main/java/org/apache/servicecomb/bizkeeper/HystrixCommandPropertiesExt.java
-================================================================
-This product bundles files from Hystrix which is licensed under the Apache License v2.
-For details, see https://github.com/Netflix/Hystrix
-
================================================================
For foundations/foundation-protobuf/src/main/java/io/protostuff/runtime/ArrayFieldMapEx.java
foundations/foundation-protobuf/src/main/java/io/protostuff/runtime/FieldMapEx.java
@@ -244,4 +238,11 @@ For foundations/foundation-protobuf/src/main/java/io/protostuff/runtime/ArrayFie
foundations/foundation-protobuf/src/main/java/io/protostuff/SchemaWriter.java
================================================================
This product bundles files from protostuff which is licensed under the Apache License v2.
-For details, see https://github.com/protostuff/protostuff
\ No newline at end of file
+For details, see https://github.com/protostuff/protostuff
+
+================================================================
+For foundations/foundation-protobuf/src/main/resources/google/protobuf/any.proto
+For foundations/foundation-protobuf/src/main/resources/google/protobuf/empty.proto
+================================================================
+This product bundles files from swagger which is licensed under the BSD-3-Clause.
+For details, see https://github.com/protocolbuffers/protobuf
diff --git a/NOTICE b/NOTICE
index 370b9498b09..e4df59ae99a 100644
--- a/NOTICE
+++ b/NOTICE
@@ -1,5 +1,5 @@
Apache ServiceComb Java Chassis
-Copyright 2017-2019 The Apache Software Foundation
+Copyright 2017-2025 The Apache Software Foundation
This product includes software developed at
The Apache Software Foundation (http://www.apache.org/).
diff --git a/README.md b/README.md
index 58d645decb8..b2fbc167625 100644
--- a/README.md
+++ b/README.md
@@ -1,72 +1,91 @@
-# Java Chassis [中文](README_ZH.md) [](https://travis-ci.org/apache/servicecomb-java-chassis?branch=master) [](https://coveralls.io/github/apache/servicecomb-java-chassis?branch=master) [](http://search.maven.org/#search%7Cga%7C1%7Corg.apache.servicecomb) [](https://www.apache.org/licenses/LICENSE-2.0.html) [](https://gitter.im/ServiceCombUsers/Lobby)
+# Java Chassis [中文](README_ZH.md) [](http://search.maven.org/#search%7Cga%7C1%7Corg.apache.servicecomb) [](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.
-# Why use Java Chassis
+> If you find this project helpful, please don't forget to `star` it.
-- **High performance**
+# releases
- The transport capability of Java Chassis is based on [Vert.x](https://vertx.io), which enables Java Chassis to process
- massive requests with relatively less hardware resources, and support [reactive develop style](https://www.reactivemanifesto.org).
+| Release Train | Latest Version | Compiled JDK Version | Tested JDK Version | Open API | Notes |
+|----------------|----------------|----------------------|--------------------|----------|--------------------------|
+| Java Chassis 3 | 3.3.0 | OpenJDK 17 | OpenJDK 17 | 3.0.x | Depends on Spring Boot 3 |
+| Java Chassis 2 | 2.8.24 | 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 |
-- **Native support for OpenAPI**
+Java Chassis core dependencies
- 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/).
+| Java Chassis | Spring Boot | Vert.x | Swagger | Jackson |
+|--------------|-------------|--------|---------|---------|
+| 3.3.x | 3.4.x | 4.5.x | 2.2.x | 2.18.x |
+| 3.2.x | 3.3.x | 4.5.x | 2.2.x | 2.18.x |
-- **Flexible develop style**
+> 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.
- Currently Java Chassis allow 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.
+> NOTICE: Java Chassis 1 reached its end of support now after it's first release from 2018.
-- **Out-of-box microservice governance features**
-
- Java Chassis provides a lot of features for microservice governance and monitor.
-
-- **Multi languages support**
+# Quick Start
- Via [ServiceComb Mesher](https://github.com/apache/servicecomb-mesher), the microservices
- built by other languages are also able to work with ServiceComb components. And Java Chassis can communicate with such
- microservices and make use of the built-in capabilities.
+* Define API
+```java
+@RequestMapping(path = "/provider")
+public interface ProviderService {
+ @GetMapping("/sayHello")
+ String sayHello(@RequestParam("name") String name);
+}
+```
-# Quick Start
+* Provider service
+```java
+@RestSchema(schemaId = "ProviderController", schemaInterface = ProviderService.class)
+public class ProviderController implements ProviderService {
+ @Override
+ public String sayHello(String name) {
+ return "Hello " + name;
+ }
+}
+```
-Provider service:
+* Consumer service
```java
-import org.apache.servicecomb.*;
-@RpcSchema(schemaId = "helloworld")
-public class HelloWorldProvider implements HelloWorld {
- public String sayHello(String name) {
- return "Hello " + name;
- }
+@Configuration
+public class ProviderServiceConfiguration {
+ @Bean
+ public ProviderService providerService() {
+ return Invoker.createProxy("provider", "ProviderController", ProviderService.class);
+ }
}
```
-Consumer service:
+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", schemaInterface = ConsumerService.class)
+public class ConsumerController implements ConsumerService {
+ private ProviderService providerService;
+
+ @Autowired
+ public void setProviderService(ProviderService providerService) {
+ this.providerService = providerService;
+ }
+
+ @Override
+ public String sayHello(String name) {
+ return providerService.sayHello(name);
+ }
}
```
+Try out this example [here](https://servicecomb.apache.org/references/java-chassis/zh_CN/start/first-sample.html) .
+
# Documentation
Project documentation is available on the [ServiceComb Java Chassis Developer Guide][java-chassis-developer-guide].
-[java-chassis-developer-guide]: https://docs.servicecomb.io/java-chassis/en_US/
+[java-chassis-developer-guide]: https://servicecomb.apache.org/references/java-chassis/zh_CN/
# Building
-You don’t need to build from source to use Java Chassis (binaries in apache nexus ), but if you want to try out the latest and greatest, Java Chassis can be easily built with the maven. You also need JDK 1.8.
+ You don’t need to build from source to use Java Chassis (binaries in apache nexus ), but if you want to try out the latest and greatest, Java Chassis can be easily built with the maven. You also need JDK 17.
mvn clean install
@@ -76,17 +95,11 @@ The first build may take a longer than expected as Maven downloads all the depen
To build the docker image and run the integration tests with docker, you can use maven docker profile
- mvn clean install -Pdocker -Pit -Pdemo-run-release
+ mvn clean install -Pdocker -Pit
If you are using docker machine, please use the following command
- mvn clean install -Pdocker -Pit -Pdocker-machine -Pdemo-run-release
-
-
-# Get The Latest Release
-
-[Download Java-Chassis](http://servicecomb.apache.org/release/java-chassis-downloads/)
-
+ mvn clean install -Pdocker -Pit -Pdocker-machine
# Contact
@@ -101,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 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 47695c4c01a..bfae9746c2b 100644
--- a/README_ZH.md
+++ b/README_ZH.md
@@ -1,68 +1,102 @@
-# Java Chassis | [English](README.md) [](https://travis-ci.org/apache/servicecomb-java-chassis?branch=master) [](https://coveralls.io/github/apache/servicecomb-java-chassis?branch=master) [](http://search.maven.org/#search%7Cga%7C1%7Corg.apache.servicecomb) [](https://www.apache.org/licenses/LICENSE-2.0.html) [](https://gitter.im/ServiceCombUsers/Lobby)
+# Java Chassis | [English](README.md) [](http://search.maven.org/#search%7Cga%7C1%7Corg.apache.servicecomb) [](https://www.apache.org/licenses/LICENSE-2.0.html)
Apache ServiceComb Java Chassis 给开发者提供一个快速构建微服务的JAVA SDK。它包含如下特性:
-* 多种开发风格,REST(JAX-RS、Spring MVC)和RPC
-* 多种通信协议, HTTP over Vert.x、Http Over Servlet、Highway等
-* 统一一致的服务提供者、服务消费者处理链,以及基于契约的开箱即用的服务治理能力
+* 基于Open API的契约优先(API First)开发模式,满足开发过程可管理、开发规范可验证要求。
+* 多种开发风格,REST(JAX-RS、Spring MVC)和RPC等,高效支持遗留系统迁移和新系统开发场景。
+* 多种通信协议, HTTP over Vert.x、Http Over Servlet、Highway等,满足不同场景对于性能、韧性的需求。
+* 统一一致的服务提供者、服务消费者处理链,易于扩展新功能。
+* 提供服务发现、配置管理、熔断、限流、灰度发布等开箱即用的服务治理能力。
-开发者可以通过[设计选型参考](https://docs.servicecomb.io/java-chassis/zh_CN/start/design/)了解更多特性和设计原理。
+可以通过[设计选型参考](https://servicecomb.apache.org/references/java-chassis/zh_CN/start/design.html) 了解更多特性和设计原理。
-# 为什么使用Java Chassis
+> 如果发现项目能帮助到您,别忘了点击右上角`star`表示鼓励。
-- **高性能**
+# 发布版本
- Java Chassis 网络层基于 [Vert.x](https://vertx.io) 实现, 支持开发者使用[响应式编程](https://www.reactivemanifesto.org), 开发者在使用熟悉的REST风格设计业务接口的时候,也能够获取到非常高性能的吞吐量。同时还提供了Highway协议,满足更高性能场景的要求。
+| 版本火车 | 最新版本 | 编译的JDK版本 | 支持的JDK版本 | Open API | 备注 |
+|----------------|--------|------------|-------------------|----------|-----------------|
+| Java Chassis 3 | 3.3.0 | OpenJDK 17 | OpenJDK 17 | 3.0.x | 依赖Spring Boot 3 |
+| Java Chassis 2 | 2.8.24 | OpenJDK 8 | OpenJDK 8, 11, 17 | 2.0.x | 依赖Spring 5 |
+| Java Chassis 1 | 1.3.11 | OpenJDK 8 | OpenJDK 8 | 2.0.x | 停止更新 |
-- **原生支持OpenAPI**
+Java Chassis 的核心依赖
- Java Chassis 的接口开发、服务治理都基于 [Swagger](https://swagger.io) ,并通过接口语义检查,使得接口定义符合 [OpenAPI 规范](https://swagger.io/specification/v2/).
+| Java Chassis | Spring Boot | Vert.x | Swagger | Jackson |
+|--------------|-------------|--------|---------|---------|
+| 3.3.x | 3.4.x | 4.5.x | 2.2.x | 2.18.x |
+| 3.2.x | 3.3.x | 4.5.x | 2.2.x | 2.18.x |
-- **灵活的开发方式**
+> NOTICE: Open API 3.0.x 不兼容 2.0.x, 因此Java Chassis 2、Java Chassis 1不能与Java Chassis 3共存互访. 升级Java Chassis 3, 需要将相关的消费者、提供者和边缘服务同时升级.
- 开发者可以使用 `SpringMVC`/`JAX-RS`/`transparent RPC` 任意一种方式定义服务端接口, 并使用`RPC`/`RestTemplate` 等方式访问这些接口. 得益于Java Chassis的通信层与开发方式分离的设计,开发者可以在 `Rest over Vertx`/`Rest over Servlet`/`Highway`等通信模式下自由切换.
+> NOTICE: Java Chassis 1 第一个版本于2018发布,已经停止更新.
-- **开箱即用的服务治理能力**
+# 快速开始
- Java Chassis 提供了大量开箱即用的服务治理能力,包括服务发现、熔断容错、负载均衡、流量控制等。
+* 定义服务契约
+```java
+@RequestMapping(path = "/provider")
+public interface ProviderService {
+ @GetMapping("/sayHello")
+ String sayHello(@RequestParam("name") String name);
+}
+```
-# 快速开始
+* 定义提供者
-定义提供者:
```java
-import org.apache.servicecomb.*;
-@RpcSchema(schemaId = "helloworld")
-public class HelloWorldProvider implements HelloWorld {
- public String sayHello(String name) {
- return "Hello " + name;
- }
+@RestSchema(schemaId = "ProviderController", schemaInterface = ProviderService.class)
+public class ProviderController implements ProviderService {
+ @Override
+ public String sayHello(String name) {
+ return "Hello " + name;
+ }
}
```
-定义消费者:
+* 定义消费者
+
+```java
+@Configuration
+public class ProviderServiceConfiguration {
+ @Bean
+ public ProviderService providerService() {
+ return Invoker.createProxy("provider", "ProviderController", ProviderService.class);
+ }
+}
+```
+
+使用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", schemaInterface = ConsumerService.class)
+public class ConsumerController implements ConsumerService {
+ private ProviderService providerService;
+
+ @Autowired
+ public void setProviderService(ProviderService providerService) {
+ this.providerService = providerService;
+ }
+
+ @Override
+ public String sayHello(String name) {
+ return providerService.sayHello(name);
+ }
}
```
+下载并体验上述[示例项目](https://servicecomb.apache.org/references/java-chassis/zh_CN/start/first-sample.html) .
+
# 用户文档
请访问 [ServiceComb Java Chassis 开发指南][java-chassis-developer-guide].
-[java-chassis-developer-guide]: https://docs.servicecomb.io/java-chassis/zh_CN/
+[java-chassis-developer-guide]: https://servicecomb.apache.org/references/java-chassis/zh_CN/
-# 编译Java Chassis
+# 编译 Java Chassis
-开发者可以通过公有mavan仓库使用Java Chassis。 如果需要构建项目,需要使用JDK 8版本,并预先安装maven。
+开发者可以通过MAVEN仓库使用Java Chassis。 如果需要构建项目,需要使用JDK 17版本,并预先安装maven。
mvn clean install
@@ -70,23 +104,17 @@ public class HelloWorldConsumer {
开发者需要预先安装docker。
- mvn clean install -Pdocker -Pit -Pdemo-run-release
+ mvn clean install -Pdocker -Pit
使用docker machine。
- mvn clean install -Pdocker -Pit -Pdocker-machine -Pdemo-run-release
-
-
-# 获取最新版本
-
-[下载链接](http://servicecomb.apache.org/cn/release/java-chassis-downloads/)
+ mvn clean install -Pdocker -Pit -Pdocker-machine
# 联系我们
-Bugs: [issues](https://issues.apache.org/jira/browse/SCB)
-
-mailing list: [subscribe](mailto:dev-subscribe@servicecomb.apache.org) [dev](https://lists.apache.org/list.html?dev@servicecomb.apache.org)
+报告缺陷: [issues](https://issues.apache.org/jira/browse/SCB)
+邮件列表: [subscribe](mailto:dev-subscribe@servicecomb.apache.org) [dev](https://lists.apache.org/list.html?dev@servicecomb.apache.org)
# 参与代码提交
@@ -94,13 +122,3 @@ mailing list: [subscribe](mailto:dev-subscribe@servicecomb.apache.org) [dev](ht
# 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 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/archetypes/README.md b/archetypes/README.md
deleted file mode 100644
index d108c68241a..00000000000
--- a/archetypes/README.md
+++ /dev/null
@@ -1,52 +0,0 @@
-## ServiceComb Java Chassis Archetypes
-### What's maven archetypes
-From http://maven.apache.org/guides/introduction/introduction-to-archetypes.html :
-
->In short, Archetype is a Maven project templating toolkit. An archetype is defined as an original pattern or model from which all other things of the same kind are made. The name fits as we are trying to provide a system that provides a consistent means of generating Maven projects. Archetype will help authors create Maven project templates for users, and provides users with the means to generate parameterized versions of those project templates.
-
-### What we provide
-1. business-service-jaxrs
-
- Archetype for create a common microservice using jaxrs provider.
-
-2. business-service-springmvc
-
- Archetype for create a common microservice using springmvc provider.
-
-3. business-service-pojo
-
- Archetype for create a common microservice using pojo provider.
-
-4. business-service-spring-boot2-starter
-
- Archetype for create a common microservice using spring-boot-starter provider.
-
-### How to build these archetypes
-We use **business-service-jaxrs** as an example :
-
-```bash
-cd archetypes
-mvn install
-```
-
-### How to use these archetypes to generate a project
-We use **business-service-jaxrs** as an example :
-#### Generate via IntelliJ IDEA
-New Project(Module) -> Maven -> Check "Create from archetype" -> Add Archetype... -> fill *GroupId* with value "org.apache.servicecomb.archetypes", fill *ArtifactId* with value "business-service-jaxrs-archetype", fill *Version* with current archetype version -> select this archetype that had listed, do next steps.
-
-#### Generate via Eclipse
-New Project(Module) -> Maven -> Next -> Add Archetype... -> fill *GroupId* with value "org.apache.servicecomb.archetypes", fill *ArtifactId* with value "business-service-jaxrs-archetype", fill *Version* with current archetype version -> select this archetype that had listed, do next steps.
-
-#### Generate via command
-
-```bash
-mvn archetype:generate -DarchetypeGroupId=org.apache.servicecomb.archetypes -DarchetypeArtifactId=business-service-jaxrs-archetype -DarchetypeVersion=${archetype-version}
-```
-
-In console Interactive mode, input your GroupId, ArtifactId and Version of new project(module), after a while the new project will be generated.
-
-*Notice: We will publish these archetypes to maven center repository since 1.0.0-m2, if you would like to use an archetype from an unreleased version, must use `archetypeRepository` option in the version 2.4 of archetype-plugin in order to set maven repository to apache snapshot groups: *
-
-```bash
-mvn org.apache.maven.plugins:maven-archetype-plugin:2.4:generate -DarchetypeGroupId=org.apache.servicecomb.archetypes -DarchetypeArtifactId=business-service-jaxrs-archetype -DarchetypeVersion=1.0.0-SNAPSHOT -DarchetypeRepository=https://repository.apache.org/content/groups/snapshots-group
-```
\ No newline at end of file
diff --git a/archetypes/business-service-jaxrs/README.md b/archetypes/business-service-jaxrs/README.md
deleted file mode 100644
index 0f1c6221030..00000000000
--- a/archetypes/business-service-jaxrs/README.md
+++ /dev/null
@@ -1,20 +0,0 @@
-## Welcome to use ServiceComb Java Chassis
-This project(module) is generate by *org.apache.servicecomb.archetypes:business-service-jaxrs-archetype*, it use **jaxrs provider** to develop service producer.
-
-### More works can be done further:
-1. Modify "HelloImpl", add your business service logic, or create some new producers to provide your services. More details can be found : http://servicecomb.apache.org/users/develop-with-jax-rs/
-2. Modify "microservice.yaml", change APPLICATION_ID, service_description.name, version, and service center address, endpoints publish address etc. More details can be found : http://servicecomb.apache.org/users/service-definition/
-3. Modify setting value of "mainClass" in pom.xml for package.
-
-### Package your service
-Under project(module) root folder, run
-```bash
-mvn package
-```
-Then you can get outputs in target folder:
-- lib : contains all dependencies jars
-- xxxxxx-{version}.jar
-```bash
-java -jar xxxxxx-{version}.jar
-```
-*Notice: If you need to modify configurations in "microservice.yaml" like service center address but don't want repackage the executable jar, **you can directly place a new "microservice.yaml" file under the same folder, then configurations will be overridden.***
\ No newline at end of file
diff --git a/archetypes/business-service-jaxrs/pom.xml b/archetypes/business-service-jaxrs/pom.xml
deleted file mode 100644
index 278f4a615d9..00000000000
--- a/archetypes/business-service-jaxrs/pom.xml
+++ /dev/null
@@ -1,61 +0,0 @@
-
-
-
-
-
- org.apache.servicecomb
- archetypes
- 2.0.2
-
-
- org.apache.servicecomb.archetypes
- Java Chassis::Archetypes::JAXRS
- business-service-jaxrs-archetype
- maven-archetype
- 4.0.0
-
-
- 2.3
-
-
-
-
-
- org.apache.maven.archetype
- archetype-packaging
- ${maven-archetype-packaging-version}
-
-
-
-
-
- src/main/resources
- false
-
-
- src/main/resources-filtered
- true
-
- **/archetype-metadata.xml
-
-
-
-
-
\ No newline at end of file
diff --git a/archetypes/business-service-jaxrs/src/main/resources-filtered/META-INF/maven/archetype-metadata.xml b/archetypes/business-service-jaxrs/src/main/resources-filtered/META-INF/maven/archetype-metadata.xml
deleted file mode 100644
index e953ae8b716..00000000000
--- a/archetypes/business-service-jaxrs/src/main/resources-filtered/META-INF/maven/archetype-metadata.xml
+++ /dev/null
@@ -1,42 +0,0 @@
-
-
-
-
- src/main/java
-
- **/*.java
-
-
-
- src/main/resources
-
- **/*
-
-
-
-
-
- README.md
-
-
-
-
\ No newline at end of file
diff --git a/archetypes/business-service-jaxrs/src/main/resources/archetype-resources/README.md b/archetypes/business-service-jaxrs/src/main/resources/archetype-resources/README.md
deleted file mode 100644
index 2f34861a897..00000000000
--- a/archetypes/business-service-jaxrs/src/main/resources/archetype-resources/README.md
+++ /dev/null
@@ -1,20 +0,0 @@
-## Welcome to use ServiceComb Java Chassis
-This project(module) is generate by *org.apache.servicecomb.archetypes:business-service-jaxrs-archetype*, it use **jaxrs provider** to develop service producer.
-
-### More works can be done further:
-1. Modify "HelloImpl", add your business service logic, or create some new producers to provide your services. More details can be found : http://servicecomb.apache.org/users/develop-with-jax-rs/
-2. Modify "microservice.yaml", change APPLICATION_ID, service_description.name, version, and service center address, endpoints publish address etc. More details can be found : http://servicecomb.apache.org/users/service-definition/
-3. Modify setting value of "mainClass" in pom.xml for package.
-
-### Package your service
-Under project(module) root folder, run
-```bash
-mvn package
-```
-Then you can get outputs in target folder:
-- lib : contains all dependencies jars
-- xxxxxx-{version}.jar
-```bash
-java -jar xxxxxx-{version}.jar
-```
-*Notice: If you need to modify config setting in "microservice.yaml" like service center address but don't want repackage the executable jar, **you can direct place a new "microservice.yaml" file in same folder, then settings will be overridden.***
\ No newline at end of file
diff --git a/archetypes/business-service-jaxrs/src/main/resources/archetype-resources/pom.xml b/archetypes/business-service-jaxrs/src/main/resources/archetype-resources/pom.xml
deleted file mode 100644
index a1286149213..00000000000
--- a/archetypes/business-service-jaxrs/src/main/resources/archetype-resources/pom.xml
+++ /dev/null
@@ -1,127 +0,0 @@
-
-
-
-
- ${groupId}
- ${artifactId}
- ${version}
- 4.0.0
-
-
- UTF-8
-
- 2.0.0
-
-
-
-
-
- org.apache.servicecomb
- java-chassis-dependencies
- ${java-chassis.version}
- pom
- import
-
-
-
-
-
-
-
- org.apache.servicecomb
- transport-rest-vertx
-
-
- org.apache.servicecomb
- transport-highway
-
-
- org.apache.servicecomb
- provider-jaxrs
-
-
- org.apache.logging.log4j
- log4j-slf4j-impl
-
-
- org.apache.logging.log4j
- log4j-api
-
-
- org.apache.logging.log4j
- log4j-core
-
-
-
-
- org.apache.servicecomb
- provider-springmvc
-
-
-
-
-
-
-
- org.apache.maven.plugins
- maven-jar-plugin
- 2.6
-
-
-
- true
- lib/
-
- ${package}.Application
-
-
- .
-
-
-
-
-
- org.apache.maven.plugins
- maven-dependency-plugin
-
-
- copy-dependencies
- package
-
- copy-dependencies
-
-
- target/lib
-
-
-
-
-
- org.apache.maven.plugins
- maven-compiler-plugin
- 3.1
-
- 1.8
- 1.8
-
-
-
-
-
\ No newline at end of file
diff --git a/archetypes/business-service-jaxrs/src/main/resources/archetype-resources/src/main/java/Application.java b/archetypes/business-service-jaxrs/src/main/resources/archetype-resources/src/main/java/Application.java
deleted file mode 100644
index 226a6c443d7..00000000000
--- a/archetypes/business-service-jaxrs/src/main/resources/archetype-resources/src/main/java/Application.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * 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.
- */
-
-package ${package};
-
-import org.apache.servicecomb.foundation.common.utils.BeanUtils;
-
-public class Application {
- public static void main(String[] args) throws Exception {
- BeanUtils.init();
- }
-}
diff --git a/archetypes/business-service-jaxrs/src/main/resources/archetype-resources/src/main/java/HelloConsumer.java b/archetypes/business-service-jaxrs/src/main/resources/archetype-resources/src/main/java/HelloConsumer.java
deleted file mode 100644
index b6eb1e39aa4..00000000000
--- a/archetypes/business-service-jaxrs/src/main/resources/archetype-resources/src/main/java/HelloConsumer.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * 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.
- */
-
-package ${package};
-
-import org.apache.servicecomb.provider.springmvc.reference.RestTemplateBuilder;
-import org.springframework.web.client.RestTemplate;
-
-public class HelloConsumer {
- private final RestTemplate restTemplate = RestTemplateBuilder.create();
-
- public void invokeHello() {
- //service url is : cse://serviceName/operation
- restTemplate.getForObject("cse://business-service/hello", String.class);
- }
-}
diff --git a/archetypes/business-service-jaxrs/src/main/resources/archetype-resources/src/main/java/HelloImpl.java b/archetypes/business-service-jaxrs/src/main/resources/archetype-resources/src/main/java/HelloImpl.java
deleted file mode 100644
index 85bdacd3855..00000000000
--- a/archetypes/business-service-jaxrs/src/main/resources/archetype-resources/src/main/java/HelloImpl.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * 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.
- */
-
-package ${package};
-
-import javax.ws.rs.GET;
-import javax.ws.rs.Path;
-
-import org.apache.servicecomb.provider.rest.common.RestSchema;
-
-@RestSchema(schemaId = "hello")
-@Path("/")
-public class HelloImpl {
-
- @Path("/hello")
- @GET
- public String hello() {
- return "Hello World!";
- }
-}
diff --git a/archetypes/business-service-jaxrs/src/main/resources/archetype-resources/src/main/resources/log4j2.xml b/archetypes/business-service-jaxrs/src/main/resources/archetype-resources/src/main/resources/log4j2.xml
deleted file mode 100644
index 2ec46303765..00000000000
--- a/archetypes/business-service-jaxrs/src/main/resources/archetype-resources/src/main/resources/log4j2.xml
+++ /dev/null
@@ -1,41 +0,0 @@
-
-
-
-
-
-
- ./target/log
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/archetypes/business-service-jaxrs/src/main/resources/archetype-resources/src/main/resources/microservice.yaml b/archetypes/business-service-jaxrs/src/main/resources/archetype-resources/src/main/resources/microservice.yaml
deleted file mode 100644
index cbed0862768..00000000000
--- a/archetypes/business-service-jaxrs/src/main/resources/archetype-resources/src/main/resources/microservice.yaml
+++ /dev/null
@@ -1,43 +0,0 @@
-## ---------------------------------------------------------------------------
-## 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.
-## ---------------------------------------------------------------------------
-
-#More details can be found :
-# 1.http://servicecomb.apache.org/users/service-definition/
-# 2.http://servicecomb.apache.org/users/service-configurations/
-# 3.http://servicecomb.apache.org/users/communicate-protocol/
-
-#Indicates an application name
-APPLICATION_ID: business
-service_description:
-#Indicates a microservice name
-#The microservice name should be unique within an application.
-#The name can contain digits, uppercase and lowercase letters, hyphens(-), underscores(_), and periods(.); and can neither start nor end with punctuations.
-#The naming rule is as follows: ^[a-zA-Z0-9]+$|^[a-zA-Z0-9][a-zA-Z0-9_-.]*[a-zA-Z0-9]$.
- name: business-service
-#Indicates a service version
- version: 1.0.0
-servicecomb:
- service:
- #Specifies the service center IP address.
- registry:
- address: http://127.0.0.1:30100
- #Specifies the rest transport listening IP address.
- rest:
- address: 0.0.0.0:8080
- #Specifies the highway transport listening IP address.
- highway:
- address: 0.0.0.0:7070
\ No newline at end of file
diff --git a/archetypes/business-service-pojo/README.md b/archetypes/business-service-pojo/README.md
deleted file mode 100644
index 333d938b14b..00000000000
--- a/archetypes/business-service-pojo/README.md
+++ /dev/null
@@ -1,20 +0,0 @@
-## Welcome to use ServiceComb Java Chassis
-This project(module) is generate by *org.apache.servicecomb.archetypes:business-service-pojo-archetype*, it use **pojo provider** to develop service producer.
-
-### More works can be done further:
-1. Modify "HelloImpl", add your business service logic, or create some new producers to provide your services. More details can be found : http://servicecomb.apache.org/users/develop-with-transparent-rpc/
-2. Modify "microservice.yaml", change APPLICATION_ID, service_description.name, version, and service center address, endpoints publish address etc. More details can be found : http://servicecomb.apache.org/users/service-definition/
-3. Modify setting value of "mainClass" in pom.xml for package.
-
-### Package your service
-Under project(module) root folder, run
-```bash
-mvn package
-```
-Then you can get outputs in target folder:
-- lib : contains all dependencies jars
-- xxxxxx-{version}.jar
-```bash
-java -jar xxxxxx-{version}.jar
-```
-*Notice: If you need to modify configurations in "microservice.yaml" like service center address but don't want repackage the executable jar, **you can directly place a new "microservice.yaml" file under the same folder, then configurations will be overridden.***
\ No newline at end of file
diff --git a/archetypes/business-service-pojo/pom.xml b/archetypes/business-service-pojo/pom.xml
deleted file mode 100644
index da9ff0a205e..00000000000
--- a/archetypes/business-service-pojo/pom.xml
+++ /dev/null
@@ -1,61 +0,0 @@
-
-
-
-
-
- org.apache.servicecomb
- archetypes
- 2.0.2
-
-
- org.apache.servicecomb.archetypes
- Java Chassis::Archetypes::POJO
- business-service-pojo-archetype
- maven-archetype
- 4.0.0
-
-
- 2.3
-
-
-
-
-
- org.apache.maven.archetype
- archetype-packaging
- ${maven-archetype-packaging-version}
-
-
-
-
-
- src/main/resources
- false
-
-
- src/main/resources-filtered
- true
-
- **/archetype-metadata.xml
-
-
-
-
-
\ No newline at end of file
diff --git a/archetypes/business-service-pojo/src/main/resources-filtered/META-INF/maven/archetype-metadata.xml b/archetypes/business-service-pojo/src/main/resources-filtered/META-INF/maven/archetype-metadata.xml
deleted file mode 100644
index e953ae8b716..00000000000
--- a/archetypes/business-service-pojo/src/main/resources-filtered/META-INF/maven/archetype-metadata.xml
+++ /dev/null
@@ -1,42 +0,0 @@
-
-
-
-
- src/main/java
-
- **/*.java
-
-
-
- src/main/resources
-
- **/*
-
-
-
-
-
- README.md
-
-
-
-
\ No newline at end of file
diff --git a/archetypes/business-service-pojo/src/main/resources/archetype-resources/README.md b/archetypes/business-service-pojo/src/main/resources/archetype-resources/README.md
deleted file mode 100644
index 003255e3665..00000000000
--- a/archetypes/business-service-pojo/src/main/resources/archetype-resources/README.md
+++ /dev/null
@@ -1,20 +0,0 @@
-## Welcome to use ServiceComb Java Chassis
-This project(module) is generate by *org.apache.servicecomb.archetypes:business-service-pojo-archetype*, it use **pojo provider** to develop service producer.
-
-### More works can be done further:
-1. Modify "HelloImpl", add your business service logic, or create some new producers to provide your services. More details can be found : http://servicecomb.apache.org/users/develop-with-transparent-rpc/
-2. Modify "microservice.yaml", change APPLICATION_ID, service_description.name, version, and service center address, endpoints publish address etc. More details can be found : http://servicecomb.apache.org/users/service-definition/
-3. Modify setting value of "mainClass" in pom.xml for package.
-
-### Package your service
-Under project(module) root folder, run
-```bash
-mvn package
-```
-Then you can get outputs in target folder:
-- lib : contains all dependencies jars
-- xxxxxx-{version}.jar
-```bash
-java -jar xxxxxx-{version}.jar
-```
-*Notice: If you need to modify config setting in "microservice.yaml" like service center address but don't want repackage the executable jar, **you can direct place a new "microservice.yaml" file in same folder, then settings will be overridden.***
\ No newline at end of file
diff --git a/archetypes/business-service-pojo/src/main/resources/archetype-resources/pom.xml b/archetypes/business-service-pojo/src/main/resources/archetype-resources/pom.xml
deleted file mode 100644
index f2aa06d39de..00000000000
--- a/archetypes/business-service-pojo/src/main/resources/archetype-resources/pom.xml
+++ /dev/null
@@ -1,120 +0,0 @@
-
-
-
-
- ${groupId}
- ${artifactId}
- ${version}
- 4.0.0
-
-
- UTF-8
-
- 2.0.0
-
-
-
-
-
- org.apache.servicecomb
- java-chassis-dependencies
- ${java-chassis.version}
- pom
- import
-
-
-
-
-
-
- org.apache.servicecomb
- transport-rest-vertx
-
-
- org.apache.servicecomb
- transport-highway
-
-
- org.apache.servicecomb
- provider-pojo
-
-
- org.apache.logging.log4j
- log4j-slf4j-impl
-
-
- org.apache.logging.log4j
- log4j-api
-
-
- org.apache.logging.log4j
- log4j-core
-
-
-
-
-
-
-
- org.apache.maven.plugins
- maven-jar-plugin
- 2.6
-
-
-
- true
- lib/
-
- ${package}.Application
-
-
- .
-
-
-
-
-
- org.apache.maven.plugins
- maven-dependency-plugin
-
-
- copy-dependencies
- package
-
- copy-dependencies
-
-
- target/lib
-
-
-
-
-
- org.apache.maven.plugins
- maven-compiler-plugin
- 3.1
-
- 1.8
- 1.8
-
-
-
-
-
\ No newline at end of file
diff --git a/archetypes/business-service-pojo/src/main/resources/archetype-resources/src/main/java/Application.java b/archetypes/business-service-pojo/src/main/resources/archetype-resources/src/main/java/Application.java
deleted file mode 100644
index 3e1feaec169..00000000000
--- a/archetypes/business-service-pojo/src/main/resources/archetype-resources/src/main/java/Application.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * 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.
- */
-
-package ${package};
-
-import org.apache.servicecomb.foundation.common.utils.BeanUtils;
-
-public class Application {
- public static void main(String[] args) throws Exception {
- BeanUtils.init();
- }
-}
\ No newline at end of file
diff --git a/archetypes/business-service-pojo/src/main/resources/archetype-resources/src/main/java/Hello.java b/archetypes/business-service-pojo/src/main/resources/archetype-resources/src/main/java/Hello.java
deleted file mode 100644
index 178c7607274..00000000000
--- a/archetypes/business-service-pojo/src/main/resources/archetype-resources/src/main/java/Hello.java
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- * 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.
- */
-
-package ${package};
-
-public interface Hello {
- String hello();
-}
\ No newline at end of file
diff --git a/archetypes/business-service-pojo/src/main/resources/archetype-resources/src/main/java/HelloConsumer.java b/archetypes/business-service-pojo/src/main/resources/archetype-resources/src/main/java/HelloConsumer.java
deleted file mode 100644
index 1d42d58ca51..00000000000
--- a/archetypes/business-service-pojo/src/main/resources/archetype-resources/src/main/java/HelloConsumer.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * 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.
- */
-
-package ${package};
-
-import org.apache.servicecomb.provider.pojo.RpcReference;
-import org.springframework.stereotype.Component;
-
-@Component
-public class HelloConsumer {
- @RpcReference(microserviceName = "business-service", schemaId = "hello")
- private Hello hello;
-
- public Hello getHello() {
- return hello;
- }
-
- public void invokeHello() {
- getHello().hello();
- }
-}
\ No newline at end of file
diff --git a/archetypes/business-service-pojo/src/main/resources/archetype-resources/src/main/java/HelloImpl.java b/archetypes/business-service-pojo/src/main/resources/archetype-resources/src/main/java/HelloImpl.java
deleted file mode 100644
index b34fe10a2cd..00000000000
--- a/archetypes/business-service-pojo/src/main/resources/archetype-resources/src/main/java/HelloImpl.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * 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.
- */
-
-package ${package};
-
-import org.apache.servicecomb.provider.pojo.RpcSchema;
-
-@RpcSchema(schemaId = "hello")
-public class HelloImpl implements Hello {
-
- public String hello() {
- return "Hello World!";
- }
-}
\ No newline at end of file
diff --git a/archetypes/business-service-pojo/src/main/resources/archetype-resources/src/main/resources/log4j2.xml b/archetypes/business-service-pojo/src/main/resources/archetype-resources/src/main/resources/log4j2.xml
deleted file mode 100644
index 2ec46303765..00000000000
--- a/archetypes/business-service-pojo/src/main/resources/archetype-resources/src/main/resources/log4j2.xml
+++ /dev/null
@@ -1,41 +0,0 @@
-
-
-
-
-
-
- ./target/log
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/archetypes/business-service-pojo/src/main/resources/archetype-resources/src/main/resources/microservice.yaml b/archetypes/business-service-pojo/src/main/resources/archetype-resources/src/main/resources/microservice.yaml
deleted file mode 100644
index cbed0862768..00000000000
--- a/archetypes/business-service-pojo/src/main/resources/archetype-resources/src/main/resources/microservice.yaml
+++ /dev/null
@@ -1,43 +0,0 @@
-## ---------------------------------------------------------------------------
-## 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.
-## ---------------------------------------------------------------------------
-
-#More details can be found :
-# 1.http://servicecomb.apache.org/users/service-definition/
-# 2.http://servicecomb.apache.org/users/service-configurations/
-# 3.http://servicecomb.apache.org/users/communicate-protocol/
-
-#Indicates an application name
-APPLICATION_ID: business
-service_description:
-#Indicates a microservice name
-#The microservice name should be unique within an application.
-#The name can contain digits, uppercase and lowercase letters, hyphens(-), underscores(_), and periods(.); and can neither start nor end with punctuations.
-#The naming rule is as follows: ^[a-zA-Z0-9]+$|^[a-zA-Z0-9][a-zA-Z0-9_-.]*[a-zA-Z0-9]$.
- name: business-service
-#Indicates a service version
- version: 1.0.0
-servicecomb:
- service:
- #Specifies the service center IP address.
- registry:
- address: http://127.0.0.1:30100
- #Specifies the rest transport listening IP address.
- rest:
- address: 0.0.0.0:8080
- #Specifies the highway transport listening IP address.
- highway:
- address: 0.0.0.0:7070
\ No newline at end of file
diff --git a/archetypes/business-service-spring-boot2-starter/README.md b/archetypes/business-service-spring-boot2-starter/README.md
deleted file mode 100755
index 89d239f6ad6..00000000000
--- a/archetypes/business-service-spring-boot2-starter/README.md
+++ /dev/null
@@ -1,36 +0,0 @@
-## Welcome to use ServiceComb Java Chassis
-This project(module) is generate by *org.apache.servicecomb.archetypes:business-service-spring-boot2-starter-archetype*, it use **java-chassis-spring-boot-starter-standalone** to develop service producer.
-
-### More works can be done further:
-1. Modify "HelloImpl", add your business service logic, or create some new producers to provide your services. More details can be found : http://servicecomb.apache.org/users/develop-with-spring-boot-starter/
-2. Modify "microservice.yaml", change APPLICATION_ID, service_description.name, version, and service center address, endpoints publish address etc. More details can be found : http://servicecomb.apache.org/users/service-definition/
-
-### Package your service
-Under project(module) root folder, run
-```bash
-mvn package
-```
-Then you can get executable jar in target/bin folder:
-- xxxxxx-{version}-exec.jar
-```bash
-java -jar xxxxxx-{version}-exec.jar
-```
-*Notice: If you need to modify config setting in "microservice.yaml" like service center address but don't want repackage the executable jar, **you can direct place a new "microservice.yaml" file in same folder, then settings will be overridden.***
-
-## Spring Boot and ServiceComb
-### Why ServiceComb make integration with Spring Boot
-Spring Boot can accelerate develop speed of Spring application, it provides these features:
-* Can create independent executable Spring application
-* Tomcat embedded, Jetty as Web server, and do not need package(war)
-* Provide many starters in order to simplify maven dependency
-
-Using Spring Boot in microservice development, can greatly simplifying configure and deploy. ServiceComb is a microservice framework with full functionality of service management, focus on rapidly development of microservices, so integration with Spring Boot can obtain greater advantages.
-
-### How ServiceComb make integration with Spring Boot2
-Developers often use Spring Boot2 in the following way:
-* Java application : import `java-chassis-spring-boot-starter-standalone` and set `web-application-type: none` in application.yaml then develop general application, does not contain WEB
-* Web application : import `java-chassis-spring-boot-starter-servlet` then develop web application, also include an embedded Tomcat or Jetty server, and use Spring Web MVC framework to develop REST endpoints
-
-The first way, do not need any refactoring, directly startup ServiceComb via Spring Boot.
-
-The second way is replace `Spring MVC DispatcherServlet` with `ServiceComb RestServlet`.
\ No newline at end of file
diff --git a/archetypes/business-service-spring-boot2-starter/pom.xml b/archetypes/business-service-spring-boot2-starter/pom.xml
deleted file mode 100755
index 615e25e5dfb..00000000000
--- a/archetypes/business-service-spring-boot2-starter/pom.xml
+++ /dev/null
@@ -1,61 +0,0 @@
-
-
-
-
-
- org.apache.servicecomb
- archetypes
- 2.0.2
-
-
- org.apache.servicecomb.archetypes
- Java Chassis::Archetypes::Spring Boot2 Starter
- business-service-spring-boot2-starter-archetype
- maven-archetype
- 4.0.0
-
-
- 2.3
-
-
-
-
-
- org.apache.maven.archetype
- archetype-packaging
- ${maven-archetype-packaging-version}
-
-
-
-
-
- src/main/resources
- false
-
-
- src/main/resources-filtered
- true
-
- **/archetype-metadata.xml
-
-
-
-
-
\ No newline at end of file
diff --git a/archetypes/business-service-spring-boot2-starter/src/main/resources-filtered/META-INF/maven/archetype-metadata.xml b/archetypes/business-service-spring-boot2-starter/src/main/resources-filtered/META-INF/maven/archetype-metadata.xml
deleted file mode 100755
index e953ae8b716..00000000000
--- a/archetypes/business-service-spring-boot2-starter/src/main/resources-filtered/META-INF/maven/archetype-metadata.xml
+++ /dev/null
@@ -1,42 +0,0 @@
-
-
-
-
- src/main/java
-
- **/*.java
-
-
-
- src/main/resources
-
- **/*
-
-
-
-
-
- README.md
-
-
-
-
\ No newline at end of file
diff --git a/archetypes/business-service-spring-boot2-starter/src/main/resources/archetype-resources/README.md b/archetypes/business-service-spring-boot2-starter/src/main/resources/archetype-resources/README.md
deleted file mode 100755
index 89d239f6ad6..00000000000
--- a/archetypes/business-service-spring-boot2-starter/src/main/resources/archetype-resources/README.md
+++ /dev/null
@@ -1,36 +0,0 @@
-## Welcome to use ServiceComb Java Chassis
-This project(module) is generate by *org.apache.servicecomb.archetypes:business-service-spring-boot2-starter-archetype*, it use **java-chassis-spring-boot-starter-standalone** to develop service producer.
-
-### More works can be done further:
-1. Modify "HelloImpl", add your business service logic, or create some new producers to provide your services. More details can be found : http://servicecomb.apache.org/users/develop-with-spring-boot-starter/
-2. Modify "microservice.yaml", change APPLICATION_ID, service_description.name, version, and service center address, endpoints publish address etc. More details can be found : http://servicecomb.apache.org/users/service-definition/
-
-### Package your service
-Under project(module) root folder, run
-```bash
-mvn package
-```
-Then you can get executable jar in target/bin folder:
-- xxxxxx-{version}-exec.jar
-```bash
-java -jar xxxxxx-{version}-exec.jar
-```
-*Notice: If you need to modify config setting in "microservice.yaml" like service center address but don't want repackage the executable jar, **you can direct place a new "microservice.yaml" file in same folder, then settings will be overridden.***
-
-## Spring Boot and ServiceComb
-### Why ServiceComb make integration with Spring Boot
-Spring Boot can accelerate develop speed of Spring application, it provides these features:
-* Can create independent executable Spring application
-* Tomcat embedded, Jetty as Web server, and do not need package(war)
-* Provide many starters in order to simplify maven dependency
-
-Using Spring Boot in microservice development, can greatly simplifying configure and deploy. ServiceComb is a microservice framework with full functionality of service management, focus on rapidly development of microservices, so integration with Spring Boot can obtain greater advantages.
-
-### How ServiceComb make integration with Spring Boot2
-Developers often use Spring Boot2 in the following way:
-* Java application : import `java-chassis-spring-boot-starter-standalone` and set `web-application-type: none` in application.yaml then develop general application, does not contain WEB
-* Web application : import `java-chassis-spring-boot-starter-servlet` then develop web application, also include an embedded Tomcat or Jetty server, and use Spring Web MVC framework to develop REST endpoints
-
-The first way, do not need any refactoring, directly startup ServiceComb via Spring Boot.
-
-The second way is replace `Spring MVC DispatcherServlet` with `ServiceComb RestServlet`.
\ No newline at end of file
diff --git a/archetypes/business-service-spring-boot2-starter/src/main/resources/archetype-resources/pom.xml b/archetypes/business-service-spring-boot2-starter/src/main/resources/archetype-resources/pom.xml
deleted file mode 100755
index f1f995e7e0b..00000000000
--- a/archetypes/business-service-spring-boot2-starter/src/main/resources/archetype-resources/pom.xml
+++ /dev/null
@@ -1,87 +0,0 @@
-
-
-
-
- ${groupId}
- ${artifactId}
- ${version}
- 4.0.0
-
-
- UTF-8
-
- 2.0.0
- 2.1.2.RELEASE
-
-
-
-
-
- org.apache.servicecomb
- java-chassis-dependencies-springboot2
- ${java-chassis.version}
- pom
- import
-
-
-
-
-
-
- org.apache.servicecomb
- java-chassis-spring-boot-starter-standalone
-
-
-
-
-
-
-
- org.springframework.boot
- spring-boot-maven-plugin
- ${springboot.version}
-
-
-
- repackage
-
-
- ${project.build.directory}/bin
- exec
-
-
-
-
-
-
- org.apache.maven.plugins
- maven-jar-plugin
- 2.6
-
-
-
- .
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/archetypes/business-service-spring-boot2-starter/src/main/resources/archetype-resources/src/main/java/Application.java b/archetypes/business-service-spring-boot2-starter/src/main/resources/archetype-resources/src/main/java/Application.java
deleted file mode 100755
index 1a6d8e30b11..00000000000
--- a/archetypes/business-service-spring-boot2-starter/src/main/resources/archetype-resources/src/main/java/Application.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * 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.
- */
-
-package ${package};
-
-import org.apache.servicecomb.springboot2.starter.EnableServiceComb;
-import org.springframework.boot.SpringApplication;
-import org.springframework.boot.autoconfigure.SpringBootApplication;
-
-@SpringBootApplication
-@EnableServiceComb
-public class Application {
- public static void main(String[] args) {
- SpringApplication.run(Application.class, args);
- }
-}
\ No newline at end of file
diff --git a/archetypes/business-service-spring-boot2-starter/src/main/resources/archetype-resources/src/main/java/HelloConsumer.java b/archetypes/business-service-spring-boot2-starter/src/main/resources/archetype-resources/src/main/java/HelloConsumer.java
deleted file mode 100755
index c03ebb071d2..00000000000
--- a/archetypes/business-service-spring-boot2-starter/src/main/resources/archetype-resources/src/main/java/HelloConsumer.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * 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.
- */
-
-package ${package};
-
-import org.apache.servicecomb.provider.springmvc.reference.RestTemplateBuilder;
-import org.springframework.web.client.RestTemplate;
-
-public class HelloConsumer {
- private final RestTemplate restTemplate = RestTemplateBuilder.create();
-
- public void invokeHello() {
- //service url is : cse://serviceName/operation
- restTemplate.getForObject("cse://business-service/hello", String.class);
- }
-}
\ No newline at end of file
diff --git a/archetypes/business-service-spring-boot2-starter/src/main/resources/archetype-resources/src/main/java/HelloImpl.java b/archetypes/business-service-spring-boot2-starter/src/main/resources/archetype-resources/src/main/java/HelloImpl.java
deleted file mode 100755
index 1a304b20d16..00000000000
--- a/archetypes/business-service-spring-boot2-starter/src/main/resources/archetype-resources/src/main/java/HelloImpl.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * 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.
- */
-
-package ${package};
-
-import org.apache.servicecomb.provider.rest.common.RestSchema;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.RequestMapping;
-
-@RestSchema(schemaId = "hello")
-@RequestMapping(path = "/")
-public class HelloImpl {
-
- @GetMapping(path = "/hello")
- public String hello() {
- return "Hello World!";
- }
-}
\ No newline at end of file
diff --git a/archetypes/business-service-spring-boot2-starter/src/main/resources/archetype-resources/src/main/resources/application.yaml b/archetypes/business-service-spring-boot2-starter/src/main/resources/archetype-resources/src/main/resources/application.yaml
deleted file mode 100644
index 80f2aeaf592..00000000000
--- a/archetypes/business-service-spring-boot2-starter/src/main/resources/archetype-resources/src/main/resources/application.yaml
+++ /dev/null
@@ -1,22 +0,0 @@
-## ---------------------------------------------------------------------------
-## 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.
-## ---------------------------------------------------------------------------
-
-#Set web-application-type to none then develop general application, does not contain WEB
-#If need to develop web application,Commented-Out it or set to servlet
-spring:
- main:
- web-application-type: none
\ No newline at end of file
diff --git a/archetypes/business-service-spring-boot2-starter/src/main/resources/archetype-resources/src/main/resources/microservice.yaml b/archetypes/business-service-spring-boot2-starter/src/main/resources/archetype-resources/src/main/resources/microservice.yaml
deleted file mode 100755
index cbed0862768..00000000000
--- a/archetypes/business-service-spring-boot2-starter/src/main/resources/archetype-resources/src/main/resources/microservice.yaml
+++ /dev/null
@@ -1,43 +0,0 @@
-## ---------------------------------------------------------------------------
-## 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.
-## ---------------------------------------------------------------------------
-
-#More details can be found :
-# 1.http://servicecomb.apache.org/users/service-definition/
-# 2.http://servicecomb.apache.org/users/service-configurations/
-# 3.http://servicecomb.apache.org/users/communicate-protocol/
-
-#Indicates an application name
-APPLICATION_ID: business
-service_description:
-#Indicates a microservice name
-#The microservice name should be unique within an application.
-#The name can contain digits, uppercase and lowercase letters, hyphens(-), underscores(_), and periods(.); and can neither start nor end with punctuations.
-#The naming rule is as follows: ^[a-zA-Z0-9]+$|^[a-zA-Z0-9][a-zA-Z0-9_-.]*[a-zA-Z0-9]$.
- name: business-service
-#Indicates a service version
- version: 1.0.0
-servicecomb:
- service:
- #Specifies the service center IP address.
- registry:
- address: http://127.0.0.1:30100
- #Specifies the rest transport listening IP address.
- rest:
- address: 0.0.0.0:8080
- #Specifies the highway transport listening IP address.
- highway:
- address: 0.0.0.0:7070
\ No newline at end of file
diff --git a/archetypes/business-service-springmvc/README.md b/archetypes/business-service-springmvc/README.md
deleted file mode 100644
index bc15691fb17..00000000000
--- a/archetypes/business-service-springmvc/README.md
+++ /dev/null
@@ -1,20 +0,0 @@
-## Welcome to use ServiceComb Java Chassis
-This project(module) is generate by *org.apache.servicecomb.archetypes:business-service-springmvc-archetype*, it use **springmvc provider** to develop service producer.
-
-### More works can be done further:
-1. Modify "HelloImpl", add your business service logic, or create some new producers to provide your services. More details can be found : http://servicecomb.apache.org/users/develop-with-springmvc/
-2. Modify "microservice.yaml", change APPLICATION_ID, service_description.name, version, and service center address, endpoints publish address etc. More details can be found : http://servicecomb.apache.org/users/service-definition/
-3. Modify setting value of "mainClass" in pom.xml for package.
-
-### Package your service
-Under project(module) root folder, run
-```bash
-mvn package
-```
-Then you can get outputs in target folder:
-- lib : contains all dependencies jars
-- xxxxxx-{version}.jar
-```bash
-java -jar xxxxxx-{version}.jar
-```
-*Notice: If you need to modify configurations in "microservice.yaml" like service center address but don't want repackage the executable jar, **you can directly place a new "microservice.yaml" file under the same folder, then configurations will be overridden.***
\ No newline at end of file
diff --git a/archetypes/business-service-springmvc/pom.xml b/archetypes/business-service-springmvc/pom.xml
deleted file mode 100644
index ebbf8b7ea33..00000000000
--- a/archetypes/business-service-springmvc/pom.xml
+++ /dev/null
@@ -1,61 +0,0 @@
-
-
-
-
-
- org.apache.servicecomb
- archetypes
- 2.0.2
-
-
- org.apache.servicecomb.archetypes
- Java Chassis::Archetypes::Spring MVC
- business-service-springmvc-archetype
- maven-archetype
- 4.0.0
-
-
- 2.3
-
-
-
-
-
- org.apache.maven.archetype
- archetype-packaging
- ${maven-archetype-packaging-version}
-
-
-
-
-
- src/main/resources
- false
-
-
- src/main/resources-filtered
- true
-
- **/archetype-metadata.xml
-
-
-
-
-
\ No newline at end of file
diff --git a/archetypes/business-service-springmvc/src/main/resources-filtered/META-INF/maven/archetype-metadata.xml b/archetypes/business-service-springmvc/src/main/resources-filtered/META-INF/maven/archetype-metadata.xml
deleted file mode 100644
index e953ae8b716..00000000000
--- a/archetypes/business-service-springmvc/src/main/resources-filtered/META-INF/maven/archetype-metadata.xml
+++ /dev/null
@@ -1,42 +0,0 @@
-
-
-
-
- src/main/java
-
- **/*.java
-
-
-
- src/main/resources
-
- **/*
-
-
-
-
-
- README.md
-
-
-
-
\ No newline at end of file
diff --git a/archetypes/business-service-springmvc/src/main/resources/archetype-resources/README.md b/archetypes/business-service-springmvc/src/main/resources/archetype-resources/README.md
deleted file mode 100644
index a09e727dc15..00000000000
--- a/archetypes/business-service-springmvc/src/main/resources/archetype-resources/README.md
+++ /dev/null
@@ -1,20 +0,0 @@
-## Welcome to use ServiceComb Java Chassis
-This project(module) is generate by *org.apache.servicecomb.archetypes:business-service-springmvc-archetype*, it use **springmvc provider** to develop service producer.
-
-### More works can be done further:
-1. Modify "HelloImpl", add your business service logic, or create some new producers to provide your services. More details can be found : http://servicecomb.apache.org/users/develop-with-springmvc/
-2. Modify "microservice.yaml", change APPLICATION_ID, service_description.name, version, and service center address, endpoints publish address etc. More details can be found : http://servicecomb.apache.org/users/service-definition/
-3. Modify setting value of "mainClass" in pom.xml for package.
-
-### Package your service
-Under project(module) root folder, run
-```bash
-mvn package
-```
-Then you can get outputs in target folder:
-- lib : contains all dependencies jars
-- xxxxxx-{version}.jar
-```bash
-java -jar xxxxxx-{version}.jar
-```
-*Notice: If you need to modify config setting in "microservice.yaml" like service center address but don't want repackage the executable jar, **you can direct place a new "microservice.yaml" file in same folder, then settings will be overridden.***
\ No newline at end of file
diff --git a/archetypes/business-service-springmvc/src/main/resources/archetype-resources/pom.xml b/archetypes/business-service-springmvc/src/main/resources/archetype-resources/pom.xml
deleted file mode 100644
index f08fa065585..00000000000
--- a/archetypes/business-service-springmvc/src/main/resources/archetype-resources/pom.xml
+++ /dev/null
@@ -1,119 +0,0 @@
-
-
-
-
- ${groupId}
- ${artifactId}
- ${version}
- 4.0.0
-
-
- UTF-8
- 2.1.2.RELEASE
-
-
-
-
-
- org.apache.servicecomb
- java-chassis-dependencies
- ${java-chassis.version}
- pom
- import
-
-
-
-
-
-
- org.apache.servicecomb
- transport-rest-vertx
-
-
- org.apache.servicecomb
- transport-highway
-
-
- org.apache.servicecomb
- provider-springmvc
-
-
- org.apache.logging.log4j
- log4j-slf4j-impl
-
-
- org.apache.logging.log4j
- log4j-api
-
-
- org.apache.logging.log4j
- log4j-core
-
-
-
-
-
-
-
- org.apache.maven.plugins
- maven-jar-plugin
- 2.6
-
-
-
- true
- lib/
-
- ${package}.Application
-
-
- .
-
-
-
-
-
- org.apache.maven.plugins
- maven-dependency-plugin
-
-
- copy-dependencies
- package
-
- copy-dependencies
-
-
- target/lib
-
-
-
-
-
- org.apache.maven.plugins
- maven-compiler-plugin
- 3.1
-
- 1.8
- 1.8
-
-
-
-
-
\ No newline at end of file
diff --git a/archetypes/business-service-springmvc/src/main/resources/archetype-resources/src/main/java/Application.java b/archetypes/business-service-springmvc/src/main/resources/archetype-resources/src/main/java/Application.java
deleted file mode 100644
index 3e1feaec169..00000000000
--- a/archetypes/business-service-springmvc/src/main/resources/archetype-resources/src/main/java/Application.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * 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.
- */
-
-package ${package};
-
-import org.apache.servicecomb.foundation.common.utils.BeanUtils;
-
-public class Application {
- public static void main(String[] args) throws Exception {
- BeanUtils.init();
- }
-}
\ No newline at end of file
diff --git a/archetypes/business-service-springmvc/src/main/resources/archetype-resources/src/main/java/HelloConsumer.java b/archetypes/business-service-springmvc/src/main/resources/archetype-resources/src/main/java/HelloConsumer.java
deleted file mode 100644
index c03ebb071d2..00000000000
--- a/archetypes/business-service-springmvc/src/main/resources/archetype-resources/src/main/java/HelloConsumer.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * 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.
- */
-
-package ${package};
-
-import org.apache.servicecomb.provider.springmvc.reference.RestTemplateBuilder;
-import org.springframework.web.client.RestTemplate;
-
-public class HelloConsumer {
- private final RestTemplate restTemplate = RestTemplateBuilder.create();
-
- public void invokeHello() {
- //service url is : cse://serviceName/operation
- restTemplate.getForObject("cse://business-service/hello", String.class);
- }
-}
\ No newline at end of file
diff --git a/archetypes/business-service-springmvc/src/main/resources/archetype-resources/src/main/java/HelloImpl.java b/archetypes/business-service-springmvc/src/main/resources/archetype-resources/src/main/java/HelloImpl.java
deleted file mode 100644
index 1a304b20d16..00000000000
--- a/archetypes/business-service-springmvc/src/main/resources/archetype-resources/src/main/java/HelloImpl.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * 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.
- */
-
-package ${package};
-
-import org.apache.servicecomb.provider.rest.common.RestSchema;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.RequestMapping;
-
-@RestSchema(schemaId = "hello")
-@RequestMapping(path = "/")
-public class HelloImpl {
-
- @GetMapping(path = "/hello")
- public String hello() {
- return "Hello World!";
- }
-}
\ No newline at end of file
diff --git a/archetypes/business-service-springmvc/src/main/resources/archetype-resources/src/main/resources/log4j2.xml b/archetypes/business-service-springmvc/src/main/resources/archetype-resources/src/main/resources/log4j2.xml
deleted file mode 100644
index 2ec46303765..00000000000
--- a/archetypes/business-service-springmvc/src/main/resources/archetype-resources/src/main/resources/log4j2.xml
+++ /dev/null
@@ -1,41 +0,0 @@
-
-
-
-
-
-
- ./target/log
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/archetypes/business-service-springmvc/src/main/resources/archetype-resources/src/main/resources/microservice.yaml b/archetypes/business-service-springmvc/src/main/resources/archetype-resources/src/main/resources/microservice.yaml
deleted file mode 100644
index cbed0862768..00000000000
--- a/archetypes/business-service-springmvc/src/main/resources/archetype-resources/src/main/resources/microservice.yaml
+++ /dev/null
@@ -1,43 +0,0 @@
-## ---------------------------------------------------------------------------
-## 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.
-## ---------------------------------------------------------------------------
-
-#More details can be found :
-# 1.http://servicecomb.apache.org/users/service-definition/
-# 2.http://servicecomb.apache.org/users/service-configurations/
-# 3.http://servicecomb.apache.org/users/communicate-protocol/
-
-#Indicates an application name
-APPLICATION_ID: business
-service_description:
-#Indicates a microservice name
-#The microservice name should be unique within an application.
-#The name can contain digits, uppercase and lowercase letters, hyphens(-), underscores(_), and periods(.); and can neither start nor end with punctuations.
-#The naming rule is as follows: ^[a-zA-Z0-9]+$|^[a-zA-Z0-9][a-zA-Z0-9_-.]*[a-zA-Z0-9]$.
- name: business-service
-#Indicates a service version
- version: 1.0.0
-servicecomb:
- service:
- #Specifies the service center IP address.
- registry:
- address: http://127.0.0.1:30100
- #Specifies the rest transport listening IP address.
- rest:
- address: 0.0.0.0:8080
- #Specifies the highway transport listening IP address.
- highway:
- address: 0.0.0.0:7070
\ No newline at end of file
diff --git a/archetypes/pom.xml b/archetypes/pom.xml
deleted file mode 100644
index 4cf39766edf..00000000000
--- a/archetypes/pom.xml
+++ /dev/null
@@ -1,37 +0,0 @@
-
-
-
- 4.0.0
-
- org.apache.servicecomb
- java-chassis-parent
- 2.0.2
- ../parents/default
-
-
- archetypes
- Java Chassis::Archetypes
- pom
-
- business-service-jaxrs
- business-service-pojo
- business-service-springmvc
- business-service-spring-boot2-starter
-
-
\ No newline at end of file
diff --git a/ci/README.md b/ci/README.md
new file mode 100644
index 00000000000..08c14d23741
--- /dev/null
+++ b/ci/README.md
@@ -0,0 +1,25 @@
+# Java Chassis Code Checks
+
+* Compilation and Installation
+
+ see .github/workflows/maven.yml
+
+* Checkstyle
+
+ 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 clean deploy -Dcheckstyle.skip -Dspotbugs.skip=true -Dmaven.javadoc.skip=true -DskipTests -Prelease -Pdistribution` . Run manually when preparing a release.
diff --git a/ci/checkstyle/checkstyle.xml b/ci/checkstyle/checkstyle.xml
new file mode 100644
index 00000000000..3813950a5c8
--- /dev/null
+++ b/ci/checkstyle/checkstyle.xml
@@ -0,0 +1,152 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ci/checkstyle/suppressions.xml b/ci/checkstyle/suppressions.xml
new file mode 100644
index 00000000000..57e56d56c35
--- /dev/null
+++ b/ci/checkstyle/suppressions.xml
@@ -0,0 +1,25 @@
+
+
+
+
+
+
+
+
diff --git a/ci/spotbugs/exclude.xml b/ci/spotbugs/exclude.xml
new file mode 100644
index 00000000000..b7c53996e85
--- /dev/null
+++ b/ci/spotbugs/exclude.xml
@@ -0,0 +1,298 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/clients/README.md b/clients/README.md
new file mode 100644
index 00000000000..53180a4a03b
--- /dev/null
+++ b/clients/README.md
@@ -0,0 +1,13 @@
+# About
+
+This module implements common http clients for servicecomb-service-center, servicecomb-kie and other
+3rd-party services.
+
+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-java-chassis, 可以用于 Spring Cloud, Dubbo 等项目。
diff --git a/clients/config-center-client/pom.xml b/clients/config-center-client/pom.xml
new file mode 100644
index 00000000000..e7e2fa1fc2b
--- /dev/null
+++ b/clients/config-center-client/pom.xml
@@ -0,0 +1,45 @@
+
+
+
+
+
+ clients
+ org.apache.servicecomb
+ 3.4.0-SNAPSHOT
+
+ 4.0.0
+
+ config-center-client
+ ServiceComb::Clients::Config Center Client
+
+
+
+
+ org.apache.servicecomb
+ http-client-common
+
+
+
+ org.apache.servicecomb
+ config-clients-common
+
+
+
diff --git a/clients/config-center-client/src/main/java/org/apache/servicecomb/config/center/client/ConfigCenterAddressManager.java b/clients/config-center-client/src/main/java/org/apache/servicecomb/config/center/client/ConfigCenterAddressManager.java
new file mode 100644
index 00000000000..977c84ef63f
--- /dev/null
+++ b/clients/config-center-client/src/main/java/org/apache/servicecomb/config/center/client/ConfigCenterAddressManager.java
@@ -0,0 +1,47 @@
+/*
+ * 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.
+ */
+
+package org.apache.servicecomb.config.center.client;
+
+import java.util.List;
+
+import org.apache.servicecomb.http.client.common.AbstractAddressManager;
+import org.apache.servicecomb.http.client.common.URLEndPoint;
+import org.apache.servicecomb.http.client.event.RefreshEndpointEvent;
+
+import com.google.common.eventbus.EventBus;
+import com.google.common.eventbus.Subscribe;
+
+public class ConfigCenterAddressManager extends AbstractAddressManager {
+
+ public ConfigCenterAddressManager(String projectName, List addresses, EventBus eventBus, String region,
+ String availableZone) {
+ super(projectName, addresses, region, availableZone);
+ eventBus.register(this);
+ }
+
+ @Override
+ protected String normalizeUri(String endpoint) {
+ String address = new URLEndPoint(endpoint).toString();
+ return formatAddress(address);
+ }
+
+ @Subscribe
+ public void onRefreshEndpointEvent(RefreshEndpointEvent event) {
+ refreshEndpoint(event, RefreshEndpointEvent.CONFIG_CENTER_NAME);
+ }
+}
diff --git a/clients/config-center-client/src/main/java/org/apache/servicecomb/config/center/client/ConfigCenterClient.java b/clients/config-center-client/src/main/java/org/apache/servicecomb/config/center/client/ConfigCenterClient.java
new file mode 100644
index 00000000000..8ed31a5a61b
--- /dev/null
+++ b/clients/config-center-client/src/main/java/org/apache/servicecomb/config/center/client/ConfigCenterClient.java
@@ -0,0 +1,216 @@
+/*
+ * 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.
+ */
+
+package org.apache.servicecomb.config.center.client;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.apache.commons.lang3.StringUtils;
+import org.apache.http.HttpStatus;
+import org.apache.servicecomb.config.common.exception.OperationException;
+import org.apache.servicecomb.config.center.client.model.QueryConfigurationsRequest;
+import org.apache.servicecomb.config.center.client.model.QueryConfigurationsResponse;
+import org.apache.servicecomb.http.client.common.HttpRequest;
+import org.apache.servicecomb.http.client.common.HttpResponse;
+import org.apache.servicecomb.http.client.common.HttpTransport;
+import org.apache.servicecomb.http.client.common.HttpUtils;
+import org.apache.servicecomb.http.client.event.OperationEvents.UnAuthorizedOperationEvent;
+import org.apache.servicecomb.http.client.utils.ServiceCombServiceAvailableUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.util.CollectionUtils;
+
+import com.fasterxml.jackson.core.type.TypeReference;
+import com.google.common.eventbus.EventBus;
+
+public class ConfigCenterClient implements ConfigCenterOperation {
+ private static final Logger LOGGER = LoggerFactory.getLogger(ConfigCenterClient.class);
+
+ public static final String DEFAULT_APP_SEPARATOR = "@";
+
+ public static final String DEFAULT_SERVICE_SEPARATOR = "#";
+
+ public static final String REVISION = "revision";
+
+ public static final String APPLICATION_CONFIG = "application";
+
+ public static final String DARK_LAUNCH = "darklaunch@";
+
+ private static final String ADDRESS_CHECK_PATH = "/v3/default/configuration/health?mode=readiness";
+
+ private final HttpTransport httpTransport;
+
+ private final ConfigCenterAddressManager addressManager;
+
+ private final Map> dimensionConfigNames = new HashMap<>();
+
+ private EventBus eventBus;
+
+ public ConfigCenterClient(ConfigCenterAddressManager addressManager, HttpTransport httpTransport) {
+ this.addressManager = addressManager;
+ this.httpTransport = httpTransport;
+ }
+
+ public void setEventBus(EventBus eventBus) {
+ this.eventBus = eventBus;
+ addressManager.setEventBus(eventBus);
+ }
+
+ @Override
+ public QueryConfigurationsResponse queryConfigurations(QueryConfigurationsRequest request, String address) {
+ String dimensionsInfo = buildDimensionsInfo(request, true);
+ QueryConfigurationsResponse queryConfigurationsResponse = new QueryConfigurationsResponse();
+
+ Map configurations = new HashMap<>();
+
+ String uri = null;
+ try {
+ uri = address + "/configuration/items?dimensionsInfo="
+ + HttpUtils.encodeURLParam(dimensionsInfo) + "&revision=" + request.getRevision();
+
+ Map headers = new HashMap<>();
+ headers.put("x-environment", request.getEnvironment());
+ HttpRequest httpRequest = new HttpRequest(uri, headers, null,
+ HttpRequest.GET);
+
+ HttpResponse httpResponse = httpTransport.doRequest(httpRequest);
+ recordAndSendUnAuthorizedEvent(httpResponse, address);
+ if (httpResponse.getStatusCode() == HttpStatus.SC_OK) {
+ Map> allConfigMap = HttpUtils.deserialize(
+ httpResponse.getContent(),
+ new TypeReference