From b064b6a515acd1fbcb42398bb7cdf35fd541368a Mon Sep 17 00:00:00 2001 From: leojames Date: Thu, 11 Jan 2024 17:03:45 +0800 Subject: [PATCH 1/2] format service samples --- samples/springboot-samples/pom.xml | 6 +++--- .../base-bootstrap/pom.xml | 4 ++-- .../java/com/alipay/sofa/base/BaseApplication.java | 0 .../main/java/com/alipay/sofa/base/EnvClient.java | 0 .../com/alipay/sofa/base/impl/AppServiceImpl.java | 0 .../com/alipay/sofa/base/impl/SampleServiceImpl.java | 0 .../alipay/sofa/base/impl/SampleServiceImplNew.java | 0 .../com/alipay/sofa/base/rest/SampleController.java | 0 .../src/main/resources/application.properties | 3 +++ .../base-facade/pom.xml | 4 ++-- .../java/com/alipay/sofa/base/facade/AppService.java | 0 .../com/alipay/sofa/base/facade/SampleService.java | 0 .../service/{sample-service-base => base}/pom.xml | 4 ++-- .../biz-bootstrap => biz1/biz1-bootstrap}/pom.xml | 12 ++++++------ .../java/com/alipay/sofa/biz/BizApplication.java | 0 .../main/java/com/alipay/sofa/biz/TestClient.java | 0 .../com/alipay/sofa/biz/rest/SampleController.java | 2 +- .../com/alipay/sofa/biz/service/StudentProvider.java | 0 .../com/alipay/sofa/biz/service/TeacherProvider.java | 0 .../src/main/resources/application.properties | 3 +++ .../biz-facade => biz1/biz1-facade}/pom.xml | 6 +++--- .../main/java/com/alipay/sofa/biz/facade/Param.java | 0 .../main/java/com/alipay/sofa/biz/facade/People.java | 0 .../java/com/alipay/sofa/biz/facade/Provider.java | 0 .../main/java/com/alipay/sofa/biz/facade/Result.java | 0 .../java/com/alipay/sofa/biz/facade/Student.java | 0 .../java/com/alipay/sofa/biz/facade/Teacher.java | 0 .../service/{sample-service-biz => biz1}/pom.xml | 10 +++++----- .../biz2-bootstrap/pom.xml | 6 +++--- .../java/com/alipay/sofa/biz2/Biz2Application.java | 0 .../main/java/com/alipay/sofa/biz2/TestClient.java | 0 .../com/alipay/sofa/biz2/rest/SampleController.java | 8 ++++---- .../alipay/sofa/biz2/service/DefaultProcessor.java | 0 .../alipay/sofa/biz2/service/SpecialProcessor.java | 0 .../src/main/resources/application.properties | 3 +++ .../biz2-facade/pom.xml | 4 ++-- .../main/java/com/alipay/sofa/biz2/facade/Data.java | 0 .../java/com/alipay/sofa/biz2/facade/Processor.java | 0 .../java/com/alipay/sofa/biz2/facade/Request.java | 0 .../java/com/alipay/sofa/biz2/facade/Response.java | 0 .../service/{sample-service-biz2 => biz2}/pom.xml | 6 +++--- .../src/main/resources/application.properties | 3 --- .../src/main/resources/application.properties | 1 - .../src/main/resources/application.properties | 1 - 44 files changed, 45 insertions(+), 41 deletions(-) rename samples/springboot-samples/service/{sample-service-base => base}/base-bootstrap/pom.xml (96%) rename samples/springboot-samples/service/{sample-service-base => base}/base-bootstrap/src/main/java/com/alipay/sofa/base/BaseApplication.java (100%) rename samples/springboot-samples/service/{sample-service-base => base}/base-bootstrap/src/main/java/com/alipay/sofa/base/EnvClient.java (100%) rename samples/springboot-samples/service/{sample-service-base => base}/base-bootstrap/src/main/java/com/alipay/sofa/base/impl/AppServiceImpl.java (100%) rename samples/springboot-samples/service/{sample-service-base => base}/base-bootstrap/src/main/java/com/alipay/sofa/base/impl/SampleServiceImpl.java (100%) rename samples/springboot-samples/service/{sample-service-base => base}/base-bootstrap/src/main/java/com/alipay/sofa/base/impl/SampleServiceImplNew.java (100%) rename samples/springboot-samples/service/{sample-service-base => base}/base-bootstrap/src/main/java/com/alipay/sofa/base/rest/SampleController.java (100%) create mode 100644 samples/springboot-samples/service/base/base-bootstrap/src/main/resources/application.properties rename samples/springboot-samples/service/{sample-service-base => base}/base-facade/pom.xml (90%) rename samples/springboot-samples/service/{sample-service-base => base}/base-facade/src/main/java/com/alipay/sofa/base/facade/AppService.java (100%) rename samples/springboot-samples/service/{sample-service-base => base}/base-facade/src/main/java/com/alipay/sofa/base/facade/SampleService.java (100%) rename samples/springboot-samples/service/{sample-service-base => base}/pom.xml (93%) rename samples/springboot-samples/service/{sample-service-biz/biz-bootstrap => biz1/biz1-bootstrap}/pom.xml (91%) rename samples/springboot-samples/service/{sample-service-biz/biz-bootstrap => biz1/biz1-bootstrap}/src/main/java/com/alipay/sofa/biz/BizApplication.java (100%) rename samples/springboot-samples/service/{sample-service-biz/biz-bootstrap => biz1/biz1-bootstrap}/src/main/java/com/alipay/sofa/biz/TestClient.java (100%) rename samples/springboot-samples/service/{sample-service-biz/biz-bootstrap => biz1/biz1-bootstrap}/src/main/java/com/alipay/sofa/biz/rest/SampleController.java (97%) rename samples/springboot-samples/service/{sample-service-biz/biz-bootstrap => biz1/biz1-bootstrap}/src/main/java/com/alipay/sofa/biz/service/StudentProvider.java (100%) rename samples/springboot-samples/service/{sample-service-biz/biz-bootstrap => biz1/biz1-bootstrap}/src/main/java/com/alipay/sofa/biz/service/TeacherProvider.java (100%) create mode 100644 samples/springboot-samples/service/biz1/biz1-bootstrap/src/main/resources/application.properties rename samples/springboot-samples/service/{sample-service-biz/biz-facade => biz1/biz1-facade}/pom.xml (84%) rename samples/springboot-samples/service/{sample-service-biz/biz-facade => biz1/biz1-facade}/src/main/java/com/alipay/sofa/biz/facade/Param.java (100%) rename samples/springboot-samples/service/{sample-service-biz/biz-facade => biz1/biz1-facade}/src/main/java/com/alipay/sofa/biz/facade/People.java (100%) rename samples/springboot-samples/service/{sample-service-biz/biz-facade => biz1/biz1-facade}/src/main/java/com/alipay/sofa/biz/facade/Provider.java (100%) rename samples/springboot-samples/service/{sample-service-biz/biz-facade => biz1/biz1-facade}/src/main/java/com/alipay/sofa/biz/facade/Result.java (100%) rename samples/springboot-samples/service/{sample-service-biz/biz-facade => biz1/biz1-facade}/src/main/java/com/alipay/sofa/biz/facade/Student.java (100%) rename samples/springboot-samples/service/{sample-service-biz/biz-facade => biz1/biz1-facade}/src/main/java/com/alipay/sofa/biz/facade/Teacher.java (100%) rename samples/springboot-samples/service/{sample-service-biz => biz1}/pom.xml (86%) rename samples/springboot-samples/service/{sample-service-biz2 => biz2}/biz2-bootstrap/pom.xml (96%) rename samples/springboot-samples/service/{sample-service-biz2 => biz2}/biz2-bootstrap/src/main/java/com/alipay/sofa/biz2/Biz2Application.java (100%) rename samples/springboot-samples/service/{sample-service-biz2 => biz2}/biz2-bootstrap/src/main/java/com/alipay/sofa/biz2/TestClient.java (100%) rename samples/springboot-samples/service/{sample-service-biz2 => biz2}/biz2-bootstrap/src/main/java/com/alipay/sofa/biz2/rest/SampleController.java (91%) rename samples/springboot-samples/service/{sample-service-biz2 => biz2}/biz2-bootstrap/src/main/java/com/alipay/sofa/biz2/service/DefaultProcessor.java (100%) rename samples/springboot-samples/service/{sample-service-biz2 => biz2}/biz2-bootstrap/src/main/java/com/alipay/sofa/biz2/service/SpecialProcessor.java (100%) create mode 100644 samples/springboot-samples/service/biz2/biz2-bootstrap/src/main/resources/application.properties rename samples/springboot-samples/service/{sample-service-biz2 => biz2}/biz2-facade/pom.xml (90%) rename samples/springboot-samples/service/{sample-service-biz2 => biz2}/biz2-facade/src/main/java/com/alipay/sofa/biz2/facade/Data.java (100%) rename samples/springboot-samples/service/{sample-service-biz2 => biz2}/biz2-facade/src/main/java/com/alipay/sofa/biz2/facade/Processor.java (100%) rename samples/springboot-samples/service/{sample-service-biz2 => biz2}/biz2-facade/src/main/java/com/alipay/sofa/biz2/facade/Request.java (100%) rename samples/springboot-samples/service/{sample-service-biz2 => biz2}/biz2-facade/src/main/java/com/alipay/sofa/biz2/facade/Response.java (100%) rename samples/springboot-samples/service/{sample-service-biz2 => biz2}/pom.xml (91%) delete mode 100644 samples/springboot-samples/service/sample-service-base/base-bootstrap/src/main/resources/application.properties delete mode 100644 samples/springboot-samples/service/sample-service-biz/biz-bootstrap/src/main/resources/application.properties delete mode 100644 samples/springboot-samples/service/sample-service-biz2/biz2-bootstrap/src/main/resources/application.properties diff --git a/samples/springboot-samples/pom.xml b/samples/springboot-samples/pom.xml index 82197d114..332ee9ea4 100644 --- a/samples/springboot-samples/pom.xml +++ b/samples/springboot-samples/pom.xml @@ -38,9 +38,9 @@ web/tomcat web/webflux/base web/webflux/biz - service/sample-service-base - service/sample-service-biz - service/sample-service-biz2 + service/base + service/biz1 + service/biz2 slimming/log4j2 msg/kafka/base msg/kafka/biz1 diff --git a/samples/springboot-samples/service/sample-service-base/base-bootstrap/pom.xml b/samples/springboot-samples/service/base/base-bootstrap/pom.xml similarity index 96% rename from samples/springboot-samples/service/sample-service-base/base-bootstrap/pom.xml rename to samples/springboot-samples/service/base/base-bootstrap/pom.xml index 92bc2927d..a8d34301c 100644 --- a/samples/springboot-samples/service/sample-service-base/base-bootstrap/pom.xml +++ b/samples/springboot-samples/service/base/base-bootstrap/pom.xml @@ -3,7 +3,7 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - sample-service-base + base com.alipay.sofa.service 0.0.1-SNAPSHOT ../pom.xml @@ -41,7 +41,7 @@ com.alipay.sofa.service - biz-facade + biz1-facade diff --git a/samples/springboot-samples/service/sample-service-base/base-bootstrap/src/main/java/com/alipay/sofa/base/BaseApplication.java b/samples/springboot-samples/service/base/base-bootstrap/src/main/java/com/alipay/sofa/base/BaseApplication.java similarity index 100% rename from samples/springboot-samples/service/sample-service-base/base-bootstrap/src/main/java/com/alipay/sofa/base/BaseApplication.java rename to samples/springboot-samples/service/base/base-bootstrap/src/main/java/com/alipay/sofa/base/BaseApplication.java diff --git a/samples/springboot-samples/service/sample-service-base/base-bootstrap/src/main/java/com/alipay/sofa/base/EnvClient.java b/samples/springboot-samples/service/base/base-bootstrap/src/main/java/com/alipay/sofa/base/EnvClient.java similarity index 100% rename from samples/springboot-samples/service/sample-service-base/base-bootstrap/src/main/java/com/alipay/sofa/base/EnvClient.java rename to samples/springboot-samples/service/base/base-bootstrap/src/main/java/com/alipay/sofa/base/EnvClient.java diff --git a/samples/springboot-samples/service/sample-service-base/base-bootstrap/src/main/java/com/alipay/sofa/base/impl/AppServiceImpl.java b/samples/springboot-samples/service/base/base-bootstrap/src/main/java/com/alipay/sofa/base/impl/AppServiceImpl.java similarity index 100% rename from samples/springboot-samples/service/sample-service-base/base-bootstrap/src/main/java/com/alipay/sofa/base/impl/AppServiceImpl.java rename to samples/springboot-samples/service/base/base-bootstrap/src/main/java/com/alipay/sofa/base/impl/AppServiceImpl.java diff --git a/samples/springboot-samples/service/sample-service-base/base-bootstrap/src/main/java/com/alipay/sofa/base/impl/SampleServiceImpl.java b/samples/springboot-samples/service/base/base-bootstrap/src/main/java/com/alipay/sofa/base/impl/SampleServiceImpl.java similarity index 100% rename from samples/springboot-samples/service/sample-service-base/base-bootstrap/src/main/java/com/alipay/sofa/base/impl/SampleServiceImpl.java rename to samples/springboot-samples/service/base/base-bootstrap/src/main/java/com/alipay/sofa/base/impl/SampleServiceImpl.java diff --git a/samples/springboot-samples/service/sample-service-base/base-bootstrap/src/main/java/com/alipay/sofa/base/impl/SampleServiceImplNew.java b/samples/springboot-samples/service/base/base-bootstrap/src/main/java/com/alipay/sofa/base/impl/SampleServiceImplNew.java similarity index 100% rename from samples/springboot-samples/service/sample-service-base/base-bootstrap/src/main/java/com/alipay/sofa/base/impl/SampleServiceImplNew.java rename to samples/springboot-samples/service/base/base-bootstrap/src/main/java/com/alipay/sofa/base/impl/SampleServiceImplNew.java diff --git a/samples/springboot-samples/service/sample-service-base/base-bootstrap/src/main/java/com/alipay/sofa/base/rest/SampleController.java b/samples/springboot-samples/service/base/base-bootstrap/src/main/java/com/alipay/sofa/base/rest/SampleController.java similarity index 100% rename from samples/springboot-samples/service/sample-service-base/base-bootstrap/src/main/java/com/alipay/sofa/base/rest/SampleController.java rename to samples/springboot-samples/service/base/base-bootstrap/src/main/java/com/alipay/sofa/base/rest/SampleController.java diff --git a/samples/springboot-samples/service/base/base-bootstrap/src/main/resources/application.properties b/samples/springboot-samples/service/base/base-bootstrap/src/main/resources/application.properties new file mode 100644 index 000000000..fbf72347e --- /dev/null +++ b/samples/springboot-samples/service/base/base-bootstrap/src/main/resources/application.properties @@ -0,0 +1,3 @@ +spring.application.name=base +logging.file.path=./service/logs/ +logging.path=./service/logs/ diff --git a/samples/springboot-samples/service/sample-service-base/base-facade/pom.xml b/samples/springboot-samples/service/base/base-facade/pom.xml similarity index 90% rename from samples/springboot-samples/service/sample-service-base/base-facade/pom.xml rename to samples/springboot-samples/service/base/base-facade/pom.xml index 82cf8eb49..06e34afb0 100644 --- a/samples/springboot-samples/service/sample-service-base/base-facade/pom.xml +++ b/samples/springboot-samples/service/base/base-facade/pom.xml @@ -3,7 +3,7 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - sample-service-base + base com.alipay.sofa.service 0.0.1-SNAPSHOT @@ -16,4 +16,4 @@ 8 - \ No newline at end of file + diff --git a/samples/springboot-samples/service/sample-service-base/base-facade/src/main/java/com/alipay/sofa/base/facade/AppService.java b/samples/springboot-samples/service/base/base-facade/src/main/java/com/alipay/sofa/base/facade/AppService.java similarity index 100% rename from samples/springboot-samples/service/sample-service-base/base-facade/src/main/java/com/alipay/sofa/base/facade/AppService.java rename to samples/springboot-samples/service/base/base-facade/src/main/java/com/alipay/sofa/base/facade/AppService.java diff --git a/samples/springboot-samples/service/sample-service-base/base-facade/src/main/java/com/alipay/sofa/base/facade/SampleService.java b/samples/springboot-samples/service/base/base-facade/src/main/java/com/alipay/sofa/base/facade/SampleService.java similarity index 100% rename from samples/springboot-samples/service/sample-service-base/base-facade/src/main/java/com/alipay/sofa/base/facade/SampleService.java rename to samples/springboot-samples/service/base/base-facade/src/main/java/com/alipay/sofa/base/facade/SampleService.java diff --git a/samples/springboot-samples/service/sample-service-base/pom.xml b/samples/springboot-samples/service/base/pom.xml similarity index 93% rename from samples/springboot-samples/service/sample-service-base/pom.xml rename to samples/springboot-samples/service/base/pom.xml index 45e2024b1..9c75d7775 100644 --- a/samples/springboot-samples/service/sample-service-base/pom.xml +++ b/samples/springboot-samples/service/base/pom.xml @@ -14,7 +14,7 @@ ../../pom.xml com.alipay.sofa.service - sample-service-base + base 0.0.1-SNAPSHOT sample-service-base sample-service-base @@ -34,7 +34,7 @@ com.alipay.sofa.service - biz-facade + biz1-facade 0.0.1-SNAPSHOT diff --git a/samples/springboot-samples/service/sample-service-biz/biz-bootstrap/pom.xml b/samples/springboot-samples/service/biz1/biz1-bootstrap/pom.xml similarity index 91% rename from samples/springboot-samples/service/sample-service-biz/biz-bootstrap/pom.xml rename to samples/springboot-samples/service/biz1/biz1-bootstrap/pom.xml index b3d7ddcf2..424ee25e8 100644 --- a/samples/springboot-samples/service/sample-service-biz/biz-bootstrap/pom.xml +++ b/samples/springboot-samples/service/biz1/biz1-bootstrap/pom.xml @@ -3,13 +3,13 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - sample-service-biz + biz1 com.alipay.sofa.service 0.0.1-SNAPSHOT 4.0.0 - biz-bootstrap + biz1-bootstrap 8 @@ -19,7 +19,7 @@ com.alipay.sofa.service - biz-facade + biz1-facade com.alipay.sofa.service @@ -72,13 +72,13 @@ true target - biz-bootstrap + biz1 - biz + biz1 true - \ No newline at end of file + diff --git a/samples/springboot-samples/service/sample-service-biz/biz-bootstrap/src/main/java/com/alipay/sofa/biz/BizApplication.java b/samples/springboot-samples/service/biz1/biz1-bootstrap/src/main/java/com/alipay/sofa/biz/BizApplication.java similarity index 100% rename from samples/springboot-samples/service/sample-service-biz/biz-bootstrap/src/main/java/com/alipay/sofa/biz/BizApplication.java rename to samples/springboot-samples/service/biz1/biz1-bootstrap/src/main/java/com/alipay/sofa/biz/BizApplication.java diff --git a/samples/springboot-samples/service/sample-service-biz/biz-bootstrap/src/main/java/com/alipay/sofa/biz/TestClient.java b/samples/springboot-samples/service/biz1/biz1-bootstrap/src/main/java/com/alipay/sofa/biz/TestClient.java similarity index 100% rename from samples/springboot-samples/service/sample-service-biz/biz-bootstrap/src/main/java/com/alipay/sofa/biz/TestClient.java rename to samples/springboot-samples/service/biz1/biz1-bootstrap/src/main/java/com/alipay/sofa/biz/TestClient.java diff --git a/samples/springboot-samples/service/sample-service-biz/biz-bootstrap/src/main/java/com/alipay/sofa/biz/rest/SampleController.java b/samples/springboot-samples/service/biz1/biz1-bootstrap/src/main/java/com/alipay/sofa/biz/rest/SampleController.java similarity index 97% rename from samples/springboot-samples/service/sample-service-biz/biz-bootstrap/src/main/java/com/alipay/sofa/biz/rest/SampleController.java rename to samples/springboot-samples/service/biz1/biz1-bootstrap/src/main/java/com/alipay/sofa/biz/rest/SampleController.java index cbc088885..41d23b25d 100644 --- a/samples/springboot-samples/service/sample-service-biz/biz-bootstrap/src/main/java/com/alipay/sofa/biz/rest/SampleController.java +++ b/samples/springboot-samples/service/biz1/biz1-bootstrap/src/main/java/com/alipay/sofa/biz/rest/SampleController.java @@ -56,6 +56,6 @@ public String hello() { System.out.println(result1); } - return "hello to ark dynamic deploy"; + return "hello to ark biz1 dynamic deploy"; } } diff --git a/samples/springboot-samples/service/sample-service-biz/biz-bootstrap/src/main/java/com/alipay/sofa/biz/service/StudentProvider.java b/samples/springboot-samples/service/biz1/biz1-bootstrap/src/main/java/com/alipay/sofa/biz/service/StudentProvider.java similarity index 100% rename from samples/springboot-samples/service/sample-service-biz/biz-bootstrap/src/main/java/com/alipay/sofa/biz/service/StudentProvider.java rename to samples/springboot-samples/service/biz1/biz1-bootstrap/src/main/java/com/alipay/sofa/biz/service/StudentProvider.java diff --git a/samples/springboot-samples/service/sample-service-biz/biz-bootstrap/src/main/java/com/alipay/sofa/biz/service/TeacherProvider.java b/samples/springboot-samples/service/biz1/biz1-bootstrap/src/main/java/com/alipay/sofa/biz/service/TeacherProvider.java similarity index 100% rename from samples/springboot-samples/service/sample-service-biz/biz-bootstrap/src/main/java/com/alipay/sofa/biz/service/TeacherProvider.java rename to samples/springboot-samples/service/biz1/biz1-bootstrap/src/main/java/com/alipay/sofa/biz/service/TeacherProvider.java diff --git a/samples/springboot-samples/service/biz1/biz1-bootstrap/src/main/resources/application.properties b/samples/springboot-samples/service/biz1/biz1-bootstrap/src/main/resources/application.properties new file mode 100644 index 000000000..8d25e0c92 --- /dev/null +++ b/samples/springboot-samples/service/biz1/biz1-bootstrap/src/main/resources/application.properties @@ -0,0 +1,3 @@ +spring.application.name=biz +logging.file.path=./service/logs/ +logging.path=./service/logs/ diff --git a/samples/springboot-samples/service/sample-service-biz/biz-facade/pom.xml b/samples/springboot-samples/service/biz1/biz1-facade/pom.xml similarity index 84% rename from samples/springboot-samples/service/sample-service-biz/biz-facade/pom.xml rename to samples/springboot-samples/service/biz1/biz1-facade/pom.xml index 4f8f07790..afe01fddb 100644 --- a/samples/springboot-samples/service/sample-service-biz/biz-facade/pom.xml +++ b/samples/springboot-samples/service/biz1/biz1-facade/pom.xml @@ -3,17 +3,17 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - sample-service-biz + biz1 com.alipay.sofa.service 0.0.1-SNAPSHOT 4.0.0 - biz-facade + biz1-facade 8 8 - \ No newline at end of file + diff --git a/samples/springboot-samples/service/sample-service-biz/biz-facade/src/main/java/com/alipay/sofa/biz/facade/Param.java b/samples/springboot-samples/service/biz1/biz1-facade/src/main/java/com/alipay/sofa/biz/facade/Param.java similarity index 100% rename from samples/springboot-samples/service/sample-service-biz/biz-facade/src/main/java/com/alipay/sofa/biz/facade/Param.java rename to samples/springboot-samples/service/biz1/biz1-facade/src/main/java/com/alipay/sofa/biz/facade/Param.java diff --git a/samples/springboot-samples/service/sample-service-biz/biz-facade/src/main/java/com/alipay/sofa/biz/facade/People.java b/samples/springboot-samples/service/biz1/biz1-facade/src/main/java/com/alipay/sofa/biz/facade/People.java similarity index 100% rename from samples/springboot-samples/service/sample-service-biz/biz-facade/src/main/java/com/alipay/sofa/biz/facade/People.java rename to samples/springboot-samples/service/biz1/biz1-facade/src/main/java/com/alipay/sofa/biz/facade/People.java diff --git a/samples/springboot-samples/service/sample-service-biz/biz-facade/src/main/java/com/alipay/sofa/biz/facade/Provider.java b/samples/springboot-samples/service/biz1/biz1-facade/src/main/java/com/alipay/sofa/biz/facade/Provider.java similarity index 100% rename from samples/springboot-samples/service/sample-service-biz/biz-facade/src/main/java/com/alipay/sofa/biz/facade/Provider.java rename to samples/springboot-samples/service/biz1/biz1-facade/src/main/java/com/alipay/sofa/biz/facade/Provider.java diff --git a/samples/springboot-samples/service/sample-service-biz/biz-facade/src/main/java/com/alipay/sofa/biz/facade/Result.java b/samples/springboot-samples/service/biz1/biz1-facade/src/main/java/com/alipay/sofa/biz/facade/Result.java similarity index 100% rename from samples/springboot-samples/service/sample-service-biz/biz-facade/src/main/java/com/alipay/sofa/biz/facade/Result.java rename to samples/springboot-samples/service/biz1/biz1-facade/src/main/java/com/alipay/sofa/biz/facade/Result.java diff --git a/samples/springboot-samples/service/sample-service-biz/biz-facade/src/main/java/com/alipay/sofa/biz/facade/Student.java b/samples/springboot-samples/service/biz1/biz1-facade/src/main/java/com/alipay/sofa/biz/facade/Student.java similarity index 100% rename from samples/springboot-samples/service/sample-service-biz/biz-facade/src/main/java/com/alipay/sofa/biz/facade/Student.java rename to samples/springboot-samples/service/biz1/biz1-facade/src/main/java/com/alipay/sofa/biz/facade/Student.java diff --git a/samples/springboot-samples/service/sample-service-biz/biz-facade/src/main/java/com/alipay/sofa/biz/facade/Teacher.java b/samples/springboot-samples/service/biz1/biz1-facade/src/main/java/com/alipay/sofa/biz/facade/Teacher.java similarity index 100% rename from samples/springboot-samples/service/sample-service-biz/biz-facade/src/main/java/com/alipay/sofa/biz/facade/Teacher.java rename to samples/springboot-samples/service/biz1/biz1-facade/src/main/java/com/alipay/sofa/biz/facade/Teacher.java diff --git a/samples/springboot-samples/service/sample-service-biz/pom.xml b/samples/springboot-samples/service/biz1/pom.xml similarity index 86% rename from samples/springboot-samples/service/sample-service-biz/pom.xml rename to samples/springboot-samples/service/biz1/pom.xml index f43e0b4eb..47f05f1cd 100644 --- a/samples/springboot-samples/service/sample-service-biz/pom.xml +++ b/samples/springboot-samples/service/biz1/pom.xml @@ -4,8 +4,8 @@ 4.0.0 pom - biz-bootstrap - biz-facade + biz1-bootstrap + biz1-facade com.alipay.sofa @@ -14,7 +14,7 @@ ../../pom.xml com.alipay.sofa.service - sample-service-biz + biz1 0.0.1-SNAPSHOT sample-service-biz sample-service-biz @@ -23,12 +23,12 @@ com.alipay.sofa.service - biz-facade + biz1-facade 0.0.1-SNAPSHOT com.alipay.sofa.service - biz-bootstrap + biz1-bootstrap 0.0.1-SNAPSHOT diff --git a/samples/springboot-samples/service/sample-service-biz2/biz2-bootstrap/pom.xml b/samples/springboot-samples/service/biz2/biz2-bootstrap/pom.xml similarity index 96% rename from samples/springboot-samples/service/sample-service-biz2/biz2-bootstrap/pom.xml rename to samples/springboot-samples/service/biz2/biz2-bootstrap/pom.xml index 8ae6148d6..947523d76 100644 --- a/samples/springboot-samples/service/sample-service-biz2/biz2-bootstrap/pom.xml +++ b/samples/springboot-samples/service/biz2/biz2-bootstrap/pom.xml @@ -3,7 +3,7 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - sample-service-biz2 + biz2 com.alipay.sofa.service 0.0.1-SNAPSHOT @@ -23,7 +23,7 @@ com.alipay.sofa.service - biz-facade + biz1-facade com.alipay.sofa.service @@ -85,4 +85,4 @@ - \ No newline at end of file + diff --git a/samples/springboot-samples/service/sample-service-biz2/biz2-bootstrap/src/main/java/com/alipay/sofa/biz2/Biz2Application.java b/samples/springboot-samples/service/biz2/biz2-bootstrap/src/main/java/com/alipay/sofa/biz2/Biz2Application.java similarity index 100% rename from samples/springboot-samples/service/sample-service-biz2/biz2-bootstrap/src/main/java/com/alipay/sofa/biz2/Biz2Application.java rename to samples/springboot-samples/service/biz2/biz2-bootstrap/src/main/java/com/alipay/sofa/biz2/Biz2Application.java diff --git a/samples/springboot-samples/service/sample-service-biz2/biz2-bootstrap/src/main/java/com/alipay/sofa/biz2/TestClient.java b/samples/springboot-samples/service/biz2/biz2-bootstrap/src/main/java/com/alipay/sofa/biz2/TestClient.java similarity index 100% rename from samples/springboot-samples/service/sample-service-biz2/biz2-bootstrap/src/main/java/com/alipay/sofa/biz2/TestClient.java rename to samples/springboot-samples/service/biz2/biz2-bootstrap/src/main/java/com/alipay/sofa/biz2/TestClient.java diff --git a/samples/springboot-samples/service/sample-service-biz2/biz2-bootstrap/src/main/java/com/alipay/sofa/biz2/rest/SampleController.java b/samples/springboot-samples/service/biz2/biz2-bootstrap/src/main/java/com/alipay/sofa/biz2/rest/SampleController.java similarity index 91% rename from samples/springboot-samples/service/sample-service-biz2/biz2-bootstrap/src/main/java/com/alipay/sofa/biz2/rest/SampleController.java rename to samples/springboot-samples/service/biz2/biz2-bootstrap/src/main/java/com/alipay/sofa/biz2/rest/SampleController.java index 01a568c33..06bf396d8 100644 --- a/samples/springboot-samples/service/sample-service-biz2/biz2-bootstrap/src/main/java/com/alipay/sofa/biz2/rest/SampleController.java +++ b/samples/springboot-samples/service/biz2/biz2-bootstrap/src/main/java/com/alipay/sofa/biz2/rest/SampleController.java @@ -33,13 +33,13 @@ public class SampleController { @AutowiredFromBase private AppService appService; - @AutowiredFromBiz(bizName = "biz", bizVersion = "0.0.1-SNAPSHOT", name = "studentProvider") + @AutowiredFromBiz(bizName = "biz1", bizVersion = "0.0.1-SNAPSHOT", name = "studentProvider") private Provider studentProvider; - @AutowiredFromBiz(bizName = "biz", name = "teacherProvider") + @AutowiredFromBiz(bizName = "biz1", name = "teacherProvider") private Provider teacherProvider; - @AutowiredFromBiz(bizName = "biz", bizVersion = "0.0.1-SNAPSHOT") + @AutowiredFromBiz(bizName = "biz1", bizVersion = "0.0.1-SNAPSHOT") private List providers; @RequestMapping(value = "/", method = RequestMethod.GET) @@ -85,6 +85,6 @@ public String hello() { Result result2 = providerMap.get(beanName).provide(new Param()); } - return "hello to ark2 dynamic deploy"; + return "hello to ark biz2 dynamic deploy"; } } diff --git a/samples/springboot-samples/service/sample-service-biz2/biz2-bootstrap/src/main/java/com/alipay/sofa/biz2/service/DefaultProcessor.java b/samples/springboot-samples/service/biz2/biz2-bootstrap/src/main/java/com/alipay/sofa/biz2/service/DefaultProcessor.java similarity index 100% rename from samples/springboot-samples/service/sample-service-biz2/biz2-bootstrap/src/main/java/com/alipay/sofa/biz2/service/DefaultProcessor.java rename to samples/springboot-samples/service/biz2/biz2-bootstrap/src/main/java/com/alipay/sofa/biz2/service/DefaultProcessor.java diff --git a/samples/springboot-samples/service/sample-service-biz2/biz2-bootstrap/src/main/java/com/alipay/sofa/biz2/service/SpecialProcessor.java b/samples/springboot-samples/service/biz2/biz2-bootstrap/src/main/java/com/alipay/sofa/biz2/service/SpecialProcessor.java similarity index 100% rename from samples/springboot-samples/service/sample-service-biz2/biz2-bootstrap/src/main/java/com/alipay/sofa/biz2/service/SpecialProcessor.java rename to samples/springboot-samples/service/biz2/biz2-bootstrap/src/main/java/com/alipay/sofa/biz2/service/SpecialProcessor.java diff --git a/samples/springboot-samples/service/biz2/biz2-bootstrap/src/main/resources/application.properties b/samples/springboot-samples/service/biz2/biz2-bootstrap/src/main/resources/application.properties new file mode 100644 index 000000000..01e92a7f5 --- /dev/null +++ b/samples/springboot-samples/service/biz2/biz2-bootstrap/src/main/resources/application.properties @@ -0,0 +1,3 @@ +spring.application.name=biz2 +logging.file.path=./service/logs/ +logging.path=./service/logs/ diff --git a/samples/springboot-samples/service/sample-service-biz2/biz2-facade/pom.xml b/samples/springboot-samples/service/biz2/biz2-facade/pom.xml similarity index 90% rename from samples/springboot-samples/service/sample-service-biz2/biz2-facade/pom.xml rename to samples/springboot-samples/service/biz2/biz2-facade/pom.xml index 17135fd98..aa94cac39 100644 --- a/samples/springboot-samples/service/sample-service-biz2/biz2-facade/pom.xml +++ b/samples/springboot-samples/service/biz2/biz2-facade/pom.xml @@ -3,7 +3,7 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - sample-service-biz2 + biz2 com.alipay.sofa.service 0.0.1-SNAPSHOT @@ -16,4 +16,4 @@ 8 - \ No newline at end of file + diff --git a/samples/springboot-samples/service/sample-service-biz2/biz2-facade/src/main/java/com/alipay/sofa/biz2/facade/Data.java b/samples/springboot-samples/service/biz2/biz2-facade/src/main/java/com/alipay/sofa/biz2/facade/Data.java similarity index 100% rename from samples/springboot-samples/service/sample-service-biz2/biz2-facade/src/main/java/com/alipay/sofa/biz2/facade/Data.java rename to samples/springboot-samples/service/biz2/biz2-facade/src/main/java/com/alipay/sofa/biz2/facade/Data.java diff --git a/samples/springboot-samples/service/sample-service-biz2/biz2-facade/src/main/java/com/alipay/sofa/biz2/facade/Processor.java b/samples/springboot-samples/service/biz2/biz2-facade/src/main/java/com/alipay/sofa/biz2/facade/Processor.java similarity index 100% rename from samples/springboot-samples/service/sample-service-biz2/biz2-facade/src/main/java/com/alipay/sofa/biz2/facade/Processor.java rename to samples/springboot-samples/service/biz2/biz2-facade/src/main/java/com/alipay/sofa/biz2/facade/Processor.java diff --git a/samples/springboot-samples/service/sample-service-biz2/biz2-facade/src/main/java/com/alipay/sofa/biz2/facade/Request.java b/samples/springboot-samples/service/biz2/biz2-facade/src/main/java/com/alipay/sofa/biz2/facade/Request.java similarity index 100% rename from samples/springboot-samples/service/sample-service-biz2/biz2-facade/src/main/java/com/alipay/sofa/biz2/facade/Request.java rename to samples/springboot-samples/service/biz2/biz2-facade/src/main/java/com/alipay/sofa/biz2/facade/Request.java diff --git a/samples/springboot-samples/service/sample-service-biz2/biz2-facade/src/main/java/com/alipay/sofa/biz2/facade/Response.java b/samples/springboot-samples/service/biz2/biz2-facade/src/main/java/com/alipay/sofa/biz2/facade/Response.java similarity index 100% rename from samples/springboot-samples/service/sample-service-biz2/biz2-facade/src/main/java/com/alipay/sofa/biz2/facade/Response.java rename to samples/springboot-samples/service/biz2/biz2-facade/src/main/java/com/alipay/sofa/biz2/facade/Response.java diff --git a/samples/springboot-samples/service/sample-service-biz2/pom.xml b/samples/springboot-samples/service/biz2/pom.xml similarity index 91% rename from samples/springboot-samples/service/sample-service-biz2/pom.xml rename to samples/springboot-samples/service/biz2/pom.xml index 9288eab37..f25ba67f5 100644 --- a/samples/springboot-samples/service/sample-service-biz2/pom.xml +++ b/samples/springboot-samples/service/biz2/pom.xml @@ -14,7 +14,7 @@ ../../pom.xml com.alipay.sofa.service - sample-service-biz2 + biz2 0.0.1-SNAPSHOT sample-service-biz2 sample-service-biz2 @@ -28,12 +28,12 @@ com.alipay.sofa.service - biz-facade + biz1-facade 0.0.1-SNAPSHOT com.alipay.sofa.service - biz-bootstrap + biz1-bootstrap 0.0.1-SNAPSHOT diff --git a/samples/springboot-samples/service/sample-service-base/base-bootstrap/src/main/resources/application.properties b/samples/springboot-samples/service/sample-service-base/base-bootstrap/src/main/resources/application.properties deleted file mode 100644 index 09dc0158f..000000000 --- a/samples/springboot-samples/service/sample-service-base/base-bootstrap/src/main/resources/application.properties +++ /dev/null @@ -1,3 +0,0 @@ -spring.application.name=base -logging.file.path=./service/base/logs/ -logging.path=./service/base/logs/ \ No newline at end of file diff --git a/samples/springboot-samples/service/sample-service-biz/biz-bootstrap/src/main/resources/application.properties b/samples/springboot-samples/service/sample-service-biz/biz-bootstrap/src/main/resources/application.properties deleted file mode 100644 index cdccaae0f..000000000 --- a/samples/springboot-samples/service/sample-service-biz/biz-bootstrap/src/main/resources/application.properties +++ /dev/null @@ -1 +0,0 @@ -spring.application.name=biz diff --git a/samples/springboot-samples/service/sample-service-biz2/biz2-bootstrap/src/main/resources/application.properties b/samples/springboot-samples/service/sample-service-biz2/biz2-bootstrap/src/main/resources/application.properties deleted file mode 100644 index 685c6469a..000000000 --- a/samples/springboot-samples/service/sample-service-biz2/biz2-bootstrap/src/main/resources/application.properties +++ /dev/null @@ -1 +0,0 @@ -spring.application.name=biz2 From 39518cac522941b01545b3cec64159b0954c31a6 Mon Sep 17 00:00:00 2001 From: leojames Date: Thu, 11 Jan 2024 17:47:22 +0800 Subject: [PATCH 2/2] update service calling readme --- samples/springboot-samples/service/README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/samples/springboot-samples/service/README.md b/samples/springboot-samples/service/README.md index 097a8cccf..28dc065cc 100644 --- a/samples/springboot-samples/service/README.md +++ b/samples/springboot-samples/service/README.md @@ -112,11 +112,11 @@ curl http://localhost:8080 #### 验证模块调用基座 -访问 biz 的 web 服务 +访问 biz1 的 web 服务 ```shell -curl http://localhost:8080/biz/ +curl http://localhost:8080/biz1/ ``` -返回 `hello to ark dynamic deploy` +返回 `hello to ark biz1 dynamic deploy` 且日志里能看到对基座base的调用都是成功的,证明模块通过 @AutowiredFromBase 或者 SpringServiceFinder.getBaseService() 方式调用基座是成功的 @@ -126,11 +126,11 @@ curl http://localhost:8080/biz/ ```shell curl http://localhost:8080/biz2/ ``` -返回 `hello to ark2 dynamic deploy` +返回 `hello to ark biz2 dynamic deploy` 且日志里能看到对模块biz的调用都是成功的,证明模块通过 @AutowiredFromBiz 或者 SpringServiceFinder.getModuleService 方式调用模块biz是成功的 ## 注意事项 这里主要使用简单应用做验证,如果复杂应用,需要注意模块做好瘦身,基座有的依赖,模块尽可能设置成 provided,尽可能使用基座的依赖。 -这里验证模块功能时,web接口后需要加上斜号,例如curl http://localhost:8080/biz/ ,而不是 http://localhost:8080/biz +这里验证模块功能时,web接口后需要加上斜号,例如curl http://localhost:8080/biz1/ ,而不是 http://localhost:8080/biz1