From 619c296c75c7ce0ed9bc2bec18b477792e5cd298 Mon Sep 17 00:00:00 2001 From: ybwei Date: Wed, 29 Jun 2022 15:56:37 +0800 Subject: [PATCH] edit --- spi/spi-jdk-demo/pom.xml | 7 +++++ spi/spi-jdk-demo/spi-execute/pom.xml | 26 ++++++++++++++++++ .../src/main/resources/logback.xml | 0 .../test/java/com/ybw/spi/test}/SpiTest.java | 4 +-- spi/spi-jdk-demo/spi-service-impl-one/pom.xml | 27 +++++++++++++++++++ .../spi}/service/impl/DemoOneServiceImpl.java | 5 ++-- .../services/com.ybw.spi.service.DemoService | 1 + spi/spi-jdk-demo/spi-service-impl-two/pom.xml | 27 +++++++++++++++++++ .../spi}/service/impl/DemoTwoServiceImpl.java | 5 ++-- .../services/com.ybw.spi.service.DemoService | 1 + spi/spi-jdk-demo/spi-service/pom.xml | 19 +++++++++++++ .../com/ybw/spi}/service/DemoService.java | 2 +- .../com.ybw.spi.jdk.demo.service.DemoService | 2 -- 13 files changed, 117 insertions(+), 9 deletions(-) create mode 100644 spi/spi-jdk-demo/spi-execute/pom.xml rename spi/spi-jdk-demo/{ => spi-execute}/src/main/resources/logback.xml (100%) rename spi/spi-jdk-demo/{src/test/java/com/ybw/spi/jdk/demo/app => spi-execute/src/test/java/com/ybw/spi/test}/SpiTest.java (89%) create mode 100644 spi/spi-jdk-demo/spi-service-impl-one/pom.xml rename spi/spi-jdk-demo/{src/main/java/com/ybw/spi/jdk/demo => spi-service-impl-one/src/main/java/com/ybw/spi}/service/impl/DemoOneServiceImpl.java (74%) create mode 100644 spi/spi-jdk-demo/spi-service-impl-one/src/main/resources/META-INF/services/com.ybw.spi.service.DemoService create mode 100644 spi/spi-jdk-demo/spi-service-impl-two/pom.xml rename spi/spi-jdk-demo/{src/main/java/com/ybw/spi/jdk/demo => spi-service-impl-two/src/main/java/com/ybw/spi}/service/impl/DemoTwoServiceImpl.java (74%) create mode 100644 spi/spi-jdk-demo/spi-service-impl-two/src/main/resources/META-INF/services/com.ybw.spi.service.DemoService create mode 100644 spi/spi-jdk-demo/spi-service/pom.xml rename spi/spi-jdk-demo/{src/main/java/com/ybw/spi/jdk/demo => spi-service/src/main/java/com/ybw/spi}/service/DemoService.java (83%) delete mode 100644 spi/spi-jdk-demo/src/main/resources/META-INF/services/com.ybw.spi.jdk.demo.service.DemoService diff --git a/spi/spi-jdk-demo/pom.xml b/spi/spi-jdk-demo/pom.xml index 7e8d5da..2135ce1 100644 --- a/spi/spi-jdk-demo/pom.xml +++ b/spi/spi-jdk-demo/pom.xml @@ -4,7 +4,14 @@ 4.0.0 com.ybw spi-jdk-demo + pom 1.0.0 + + spi-service + spi-service-impl-one + spi-service-impl-two + spi-execute + spi-jdk-demo SPI全称,Service Provider Interface,服务提供者接口 diff --git a/spi/spi-jdk-demo/spi-execute/pom.xml b/spi/spi-jdk-demo/spi-execute/pom.xml new file mode 100644 index 0000000..7c50490 --- /dev/null +++ b/spi/spi-jdk-demo/spi-execute/pom.xml @@ -0,0 +1,26 @@ + + + + spi-jdk-demo + com.ybw + 1.0.0 + + 4.0.0 + + spi-execute + + + 8 + 8 + + + + + ${project.groupId} + spi-service-impl-one + ${project.version} + + + \ No newline at end of file diff --git a/spi/spi-jdk-demo/src/main/resources/logback.xml b/spi/spi-jdk-demo/spi-execute/src/main/resources/logback.xml similarity index 100% rename from spi/spi-jdk-demo/src/main/resources/logback.xml rename to spi/spi-jdk-demo/spi-execute/src/main/resources/logback.xml diff --git a/spi/spi-jdk-demo/src/test/java/com/ybw/spi/jdk/demo/app/SpiTest.java b/spi/spi-jdk-demo/spi-execute/src/test/java/com/ybw/spi/test/SpiTest.java similarity index 89% rename from spi/spi-jdk-demo/src/test/java/com/ybw/spi/jdk/demo/app/SpiTest.java rename to spi/spi-jdk-demo/spi-execute/src/test/java/com/ybw/spi/test/SpiTest.java index 68dde93..d646002 100644 --- a/spi/spi-jdk-demo/src/test/java/com/ybw/spi/jdk/demo/app/SpiTest.java +++ b/spi/spi-jdk-demo/spi-execute/src/test/java/com/ybw/spi/test/SpiTest.java @@ -1,6 +1,6 @@ -package com.ybw.spi.jdk.demo.app; +package com.ybw.spi.test; -import com.ybw.spi.jdk.demo.service.DemoService; +import com.ybw.spi.service.DemoService; import lombok.extern.slf4j.Slf4j; import org.junit.jupiter.api.Test; diff --git a/spi/spi-jdk-demo/spi-service-impl-one/pom.xml b/spi/spi-jdk-demo/spi-service-impl-one/pom.xml new file mode 100644 index 0000000..e06c97c --- /dev/null +++ b/spi/spi-jdk-demo/spi-service-impl-one/pom.xml @@ -0,0 +1,27 @@ + + + + spi-jdk-demo + com.ybw + 1.0.0 + + 4.0.0 + + spi-service-impl-one + + + 8 + 8 + + + + + ${project.groupId} + spi-service + ${project.version} + + + + \ No newline at end of file diff --git a/spi/spi-jdk-demo/src/main/java/com/ybw/spi/jdk/demo/service/impl/DemoOneServiceImpl.java b/spi/spi-jdk-demo/spi-service-impl-one/src/main/java/com/ybw/spi/service/impl/DemoOneServiceImpl.java similarity index 74% rename from spi/spi-jdk-demo/src/main/java/com/ybw/spi/jdk/demo/service/impl/DemoOneServiceImpl.java rename to spi/spi-jdk-demo/spi-service-impl-one/src/main/java/com/ybw/spi/service/impl/DemoOneServiceImpl.java index c931f3a..ecdf550 100644 --- a/spi/spi-jdk-demo/src/main/java/com/ybw/spi/jdk/demo/service/impl/DemoOneServiceImpl.java +++ b/spi/spi-jdk-demo/spi-service-impl-one/src/main/java/com/ybw/spi/service/impl/DemoOneServiceImpl.java @@ -1,6 +1,7 @@ -package com.ybw.spi.jdk.demo.service.impl; +package com.ybw.spi.service.impl; -import com.ybw.spi.jdk.demo.service.DemoService; + +import com.ybw.spi.service.DemoService; /** * Implement for DemoService diff --git a/spi/spi-jdk-demo/spi-service-impl-one/src/main/resources/META-INF/services/com.ybw.spi.service.DemoService b/spi/spi-jdk-demo/spi-service-impl-one/src/main/resources/META-INF/services/com.ybw.spi.service.DemoService new file mode 100644 index 0000000..d659c59 --- /dev/null +++ b/spi/spi-jdk-demo/spi-service-impl-one/src/main/resources/META-INF/services/com.ybw.spi.service.DemoService @@ -0,0 +1 @@ +com.ybw.spi.service.impl.DemoOneServiceImpl \ No newline at end of file diff --git a/spi/spi-jdk-demo/spi-service-impl-two/pom.xml b/spi/spi-jdk-demo/spi-service-impl-two/pom.xml new file mode 100644 index 0000000..deb7b6c --- /dev/null +++ b/spi/spi-jdk-demo/spi-service-impl-two/pom.xml @@ -0,0 +1,27 @@ + + + + spi-jdk-demo + com.ybw + 1.0.0 + + 4.0.0 + + spi-service-impl-two + + + 8 + 8 + + + + + + ${project.groupId} + spi-service + ${project.version} + + + \ No newline at end of file diff --git a/spi/spi-jdk-demo/src/main/java/com/ybw/spi/jdk/demo/service/impl/DemoTwoServiceImpl.java b/spi/spi-jdk-demo/spi-service-impl-two/src/main/java/com/ybw/spi/service/impl/DemoTwoServiceImpl.java similarity index 74% rename from spi/spi-jdk-demo/src/main/java/com/ybw/spi/jdk/demo/service/impl/DemoTwoServiceImpl.java rename to spi/spi-jdk-demo/spi-service-impl-two/src/main/java/com/ybw/spi/service/impl/DemoTwoServiceImpl.java index 9fc55f1..cd70904 100644 --- a/spi/spi-jdk-demo/src/main/java/com/ybw/spi/jdk/demo/service/impl/DemoTwoServiceImpl.java +++ b/spi/spi-jdk-demo/spi-service-impl-two/src/main/java/com/ybw/spi/service/impl/DemoTwoServiceImpl.java @@ -1,6 +1,7 @@ -package com.ybw.spi.jdk.demo.service.impl; +package com.ybw.spi.service.impl; -import com.ybw.spi.jdk.demo.service.DemoService; + +import com.ybw.spi.service.DemoService; /** * Implement for DemoService diff --git a/spi/spi-jdk-demo/spi-service-impl-two/src/main/resources/META-INF/services/com.ybw.spi.service.DemoService b/spi/spi-jdk-demo/spi-service-impl-two/src/main/resources/META-INF/services/com.ybw.spi.service.DemoService new file mode 100644 index 0000000..d2bfe83 --- /dev/null +++ b/spi/spi-jdk-demo/spi-service-impl-two/src/main/resources/META-INF/services/com.ybw.spi.service.DemoService @@ -0,0 +1 @@ +com.ybw.spi.service.impl.DemoTwoServiceImpl \ No newline at end of file diff --git a/spi/spi-jdk-demo/spi-service/pom.xml b/spi/spi-jdk-demo/spi-service/pom.xml new file mode 100644 index 0000000..2485b7f --- /dev/null +++ b/spi/spi-jdk-demo/spi-service/pom.xml @@ -0,0 +1,19 @@ + + + + spi-jdk-demo + com.ybw + 1.0.0 + + 4.0.0 + + spi-service + + + 8 + 8 + + + \ No newline at end of file diff --git a/spi/spi-jdk-demo/src/main/java/com/ybw/spi/jdk/demo/service/DemoService.java b/spi/spi-jdk-demo/spi-service/src/main/java/com/ybw/spi/service/DemoService.java similarity index 83% rename from spi/spi-jdk-demo/src/main/java/com/ybw/spi/jdk/demo/service/DemoService.java rename to spi/spi-jdk-demo/spi-service/src/main/java/com/ybw/spi/service/DemoService.java index 21acaa2..2d88692 100644 --- a/spi/spi-jdk-demo/src/main/java/com/ybw/spi/jdk/demo/service/DemoService.java +++ b/spi/spi-jdk-demo/spi-service/src/main/java/com/ybw/spi/service/DemoService.java @@ -1,4 +1,4 @@ -package com.ybw.spi.jdk.demo.service; +package com.ybw.spi.service; /** diff --git a/spi/spi-jdk-demo/src/main/resources/META-INF/services/com.ybw.spi.jdk.demo.service.DemoService b/spi/spi-jdk-demo/src/main/resources/META-INF/services/com.ybw.spi.jdk.demo.service.DemoService deleted file mode 100644 index 6bebe64..0000000 --- a/spi/spi-jdk-demo/src/main/resources/META-INF/services/com.ybw.spi.jdk.demo.service.DemoService +++ /dev/null @@ -1,2 +0,0 @@ -com.ybw.spi.jdk.demo.service.impl.DemoOneServiceImpl -com.ybw.spi.jdk.demo.service.impl.DemoTwoServiceImpl \ No newline at end of file