This is an automated email from the ASF dual-hosted git repository.
duanzhengqiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere.git
The following commit(s) were added to refs/heads/master by this push:
new b27ed055321 Spilt shardingsphere-infra-spi module (#27585)
b27ed055321 is described below
commit b27ed055321de4074f43baa2737c96596a84b27f
Author: Liang Zhang <[email protected]>
AuthorDate: Mon Jul 31 15:57:49 2023 +0800
Spilt shardingsphere-infra-spi module (#27585)
---
infra/pom.xml | 1 +
infra/{util => spi}/pom.xml | 16 ++++------------
.../infra/util/spi/ShardingSphereServiceLoader.java | 0
.../infra/util/spi/annotation/SPIDescription.java | 0
.../infra/util/spi/annotation/SingletonSPI.java | 0
.../ServiceProviderNotFoundServerException.java | 6 ++++--
.../infra/util/spi/type/ordered/OrderedSPI.java | 0
.../infra/util/spi/type/ordered/OrderedSPILoader.java | 0
.../spi/type/ordered/cache/OrderedServicesCache.java | 0
.../infra/util/spi/type/typed/TypedSPI.java | 0
.../infra/util/spi/type/typed/TypedSPILoader.java | 0
.../type/typed/algorithm/ShardingSphereAlgorithm.java | 0
.../infra/util/spi/ShardingSphereServiceLoaderTest.java | 0
.../exception/ServiceProviderNotFoundExceptionTest.java | 0
.../infra/util/spi/fixture/empty/EmptySPIFixture.java | 0
.../util/spi/fixture/multiton/MultitonSPIFixture.java | 0
.../fixture/multiton/impl/MultitonSPIFixtureImpl.java | 0
.../util/spi/fixture/singleton/SingletonSPIFixture.java | 0
.../fixture/singleton/impl/SingletonSPIFixtureImpl.java | 0
.../util/spi/type/ordered/OrderedSPILoaderTest.java | 0
.../spi/type/ordered/cache/OrderedServicesCacheTest.java | 0
.../type/ordered/fixture/OrderedInterfaceFixture.java | 0
.../util/spi/type/ordered/fixture/OrderedSPIFixture.java | 0
.../fixture/impl/OrderedInterfaceFixtureImpl.java | 0
.../type/ordered/fixture/impl/OrderedSPIFixtureImpl.java | 0
.../infra/util/spi/type/typed/TypedSPILoaderTest.java | 0
.../util/spi/type/typed/fixture/TypedSPIFixture.java | 0
.../spi/type/typed/fixture/impl/TypedSPIFixtureImpl.java | 0
...re.infra.util.spi.fixture.multiton.MultitonSPIFixture | 0
....infra.util.spi.fixture.singleton.SingletonSPIFixture | 0
...infra.util.spi.type.ordered.fixture.OrderedSPIFixture | 0
...ere.infra.util.spi.type.typed.fixture.TypedSPIFixture | 0
infra/util/pom.xml | 6 ++++++
.../infra/util/props/TypedPropertyValueTest.java | 6 +++---
.../util/props/fixture/TypedPropertyKeyFixture.java | 5 +++--
.../fixture/{ => enums}/TypedPropertyEnumFixture.java | 2 +-
.../fixture/typed/PropertiesTypedSPIFixture.java} | 4 ++--
.../PropertiesTypedSPIFixtureImpl.java} | 9 ++++++---
...a.util.props.fixture.typed.PropertiesTypedSPIFixture} | 2 +-
39 files changed, 31 insertions(+), 26 deletions(-)
diff --git a/infra/pom.xml b/infra/pom.xml
index 5f2b8230a37..1aea03b1358 100644
--- a/infra/pom.xml
+++ b/infra/pom.xml
@@ -28,6 +28,7 @@
<name>${project.artifactId}</name>
<modules>
+ <module>spi</module>
<module>exception</module>
<module>database</module>
<module>binder</module>
diff --git a/infra/util/pom.xml b/infra/spi/pom.xml
similarity index 76%
copy from infra/util/pom.xml
copy to infra/spi/pom.xml
index 496db15d5d0..03b1fa61237 100644
--- a/infra/util/pom.xml
+++ b/infra/spi/pom.xml
@@ -23,21 +23,13 @@
<artifactId>shardingsphere-infra</artifactId>
<version>5.4.1-SNAPSHOT</version>
</parent>
- <artifactId>shardingsphere-infra-util</artifactId>
+ <artifactId>shardingsphere-infra-spi</artifactId>
<dependencies>
<dependency>
- <groupId>org.yaml</groupId>
- <artifactId>snakeyaml</artifactId>
- </dependency>
- <dependency>
- <groupId>com.fasterxml.jackson.core</groupId>
- <artifactId>jackson-databind</artifactId>
- </dependency>
- <dependency>
- <groupId>com.fasterxml.jackson.datatype</groupId>
- <artifactId>jackson-datatype-jsr310</artifactId>
- <version>${jackson.version}</version>
+ <groupId>org.apache.shardingsphere</groupId>
+ <artifactId>shardingsphere-infra-exception-core</artifactId>
+ <version>${project.version}</version>
</dependency>
<dependency>
diff --git
a/infra/util/src/main/java/org/apache/shardingsphere/infra/util/spi/ShardingSphereServiceLoader.java
b/infra/spi/src/main/java/org/apache/shardingsphere/infra/util/spi/ShardingSphereServiceLoader.java
similarity index 100%
rename from
infra/util/src/main/java/org/apache/shardingsphere/infra/util/spi/ShardingSphereServiceLoader.java
rename to
infra/spi/src/main/java/org/apache/shardingsphere/infra/util/spi/ShardingSphereServiceLoader.java
diff --git
a/infra/util/src/main/java/org/apache/shardingsphere/infra/util/spi/annotation/SPIDescription.java
b/infra/spi/src/main/java/org/apache/shardingsphere/infra/util/spi/annotation/SPIDescription.java
similarity index 100%
rename from
infra/util/src/main/java/org/apache/shardingsphere/infra/util/spi/annotation/SPIDescription.java
rename to
infra/spi/src/main/java/org/apache/shardingsphere/infra/util/spi/annotation/SPIDescription.java
diff --git
a/infra/util/src/main/java/org/apache/shardingsphere/infra/util/spi/annotation/SingletonSPI.java
b/infra/spi/src/main/java/org/apache/shardingsphere/infra/util/spi/annotation/SingletonSPI.java
similarity index 100%
rename from
infra/util/src/main/java/org/apache/shardingsphere/infra/util/spi/annotation/SingletonSPI.java
rename to
infra/spi/src/main/java/org/apache/shardingsphere/infra/util/spi/annotation/SingletonSPI.java
diff --git
a/infra/util/src/main/java/org/apache/shardingsphere/infra/util/spi/exception/ServiceProviderNotFoundServerException.java
b/infra/spi/src/main/java/org/apache/shardingsphere/infra/util/spi/exception/ServiceProviderNotFoundServerException.java
similarity index 82%
rename from
infra/util/src/main/java/org/apache/shardingsphere/infra/util/spi/exception/ServiceProviderNotFoundServerException.java
rename to
infra/spi/src/main/java/org/apache/shardingsphere/infra/util/spi/exception/ServiceProviderNotFoundServerException.java
index 00f059eed40..8cc5469c660 100644
---
a/infra/util/src/main/java/org/apache/shardingsphere/infra/util/spi/exception/ServiceProviderNotFoundServerException.java
+++
b/infra/spi/src/main/java/org/apache/shardingsphere/infra/util/spi/exception/ServiceProviderNotFoundServerException.java
@@ -17,10 +17,12 @@
package org.apache.shardingsphere.infra.util.spi.exception;
+import
org.apache.shardingsphere.infra.exception.core.external.server.ShardingSphereServerException;
+
/**
* Service provider not found exception.
*/
-public final class ServiceProviderNotFoundServerException extends
RuntimeException {
+public final class ServiceProviderNotFoundServerException extends
ShardingSphereServerException {
private static final long serialVersionUID = -3730257541332863236L;
@@ -29,6 +31,6 @@ public final class ServiceProviderNotFoundServerException
extends RuntimeExcepti
private static final int ERROR_CODE = 1;
public ServiceProviderNotFoundServerException(final Class<?> clazz, final
Object type) {
- super(String.format("%s-%05d: %s", ERROR_CATEGORY, ERROR_CODE,
String.format("No implementation class load from SPI `%s` with type `%s`.",
clazz.getName(), type)));
+ super(ERROR_CATEGORY, ERROR_CODE, String.format("No implementation
class load from SPI `%s` with type `%s`.", clazz.getName(), type));
}
}
diff --git
a/infra/util/src/main/java/org/apache/shardingsphere/infra/util/spi/type/ordered/OrderedSPI.java
b/infra/spi/src/main/java/org/apache/shardingsphere/infra/util/spi/type/ordered/OrderedSPI.java
similarity index 100%
rename from
infra/util/src/main/java/org/apache/shardingsphere/infra/util/spi/type/ordered/OrderedSPI.java
rename to
infra/spi/src/main/java/org/apache/shardingsphere/infra/util/spi/type/ordered/OrderedSPI.java
diff --git
a/infra/util/src/main/java/org/apache/shardingsphere/infra/util/spi/type/ordered/OrderedSPILoader.java
b/infra/spi/src/main/java/org/apache/shardingsphere/infra/util/spi/type/ordered/OrderedSPILoader.java
similarity index 100%
rename from
infra/util/src/main/java/org/apache/shardingsphere/infra/util/spi/type/ordered/OrderedSPILoader.java
rename to
infra/spi/src/main/java/org/apache/shardingsphere/infra/util/spi/type/ordered/OrderedSPILoader.java
diff --git
a/infra/util/src/main/java/org/apache/shardingsphere/infra/util/spi/type/ordered/cache/OrderedServicesCache.java
b/infra/spi/src/main/java/org/apache/shardingsphere/infra/util/spi/type/ordered/cache/OrderedServicesCache.java
similarity index 100%
rename from
infra/util/src/main/java/org/apache/shardingsphere/infra/util/spi/type/ordered/cache/OrderedServicesCache.java
rename to
infra/spi/src/main/java/org/apache/shardingsphere/infra/util/spi/type/ordered/cache/OrderedServicesCache.java
diff --git
a/infra/util/src/main/java/org/apache/shardingsphere/infra/util/spi/type/typed/TypedSPI.java
b/infra/spi/src/main/java/org/apache/shardingsphere/infra/util/spi/type/typed/TypedSPI.java
similarity index 100%
rename from
infra/util/src/main/java/org/apache/shardingsphere/infra/util/spi/type/typed/TypedSPI.java
rename to
infra/spi/src/main/java/org/apache/shardingsphere/infra/util/spi/type/typed/TypedSPI.java
diff --git
a/infra/util/src/main/java/org/apache/shardingsphere/infra/util/spi/type/typed/TypedSPILoader.java
b/infra/spi/src/main/java/org/apache/shardingsphere/infra/util/spi/type/typed/TypedSPILoader.java
similarity index 100%
rename from
infra/util/src/main/java/org/apache/shardingsphere/infra/util/spi/type/typed/TypedSPILoader.java
rename to
infra/spi/src/main/java/org/apache/shardingsphere/infra/util/spi/type/typed/TypedSPILoader.java
diff --git
a/infra/util/src/main/java/org/apache/shardingsphere/infra/util/spi/type/typed/algorithm/ShardingSphereAlgorithm.java
b/infra/spi/src/main/java/org/apache/shardingsphere/infra/util/spi/type/typed/algorithm/ShardingSphereAlgorithm.java
similarity index 100%
rename from
infra/util/src/main/java/org/apache/shardingsphere/infra/util/spi/type/typed/algorithm/ShardingSphereAlgorithm.java
rename to
infra/spi/src/main/java/org/apache/shardingsphere/infra/util/spi/type/typed/algorithm/ShardingSphereAlgorithm.java
diff --git
a/infra/util/src/test/java/org/apache/shardingsphere/infra/util/spi/ShardingSphereServiceLoaderTest.java
b/infra/spi/src/test/java/org/apache/shardingsphere/infra/util/spi/ShardingSphereServiceLoaderTest.java
similarity index 100%
rename from
infra/util/src/test/java/org/apache/shardingsphere/infra/util/spi/ShardingSphereServiceLoaderTest.java
rename to
infra/spi/src/test/java/org/apache/shardingsphere/infra/util/spi/ShardingSphereServiceLoaderTest.java
diff --git
a/infra/util/src/test/java/org/apache/shardingsphere/infra/util/spi/exception/ServiceProviderNotFoundExceptionTest.java
b/infra/spi/src/test/java/org/apache/shardingsphere/infra/util/spi/exception/ServiceProviderNotFoundExceptionTest.java
similarity index 100%
rename from
infra/util/src/test/java/org/apache/shardingsphere/infra/util/spi/exception/ServiceProviderNotFoundExceptionTest.java
rename to
infra/spi/src/test/java/org/apache/shardingsphere/infra/util/spi/exception/ServiceProviderNotFoundExceptionTest.java
diff --git
a/infra/util/src/test/java/org/apache/shardingsphere/infra/util/spi/fixture/empty/EmptySPIFixture.java
b/infra/spi/src/test/java/org/apache/shardingsphere/infra/util/spi/fixture/empty/EmptySPIFixture.java
similarity index 100%
rename from
infra/util/src/test/java/org/apache/shardingsphere/infra/util/spi/fixture/empty/EmptySPIFixture.java
rename to
infra/spi/src/test/java/org/apache/shardingsphere/infra/util/spi/fixture/empty/EmptySPIFixture.java
diff --git
a/infra/util/src/test/java/org/apache/shardingsphere/infra/util/spi/fixture/multiton/MultitonSPIFixture.java
b/infra/spi/src/test/java/org/apache/shardingsphere/infra/util/spi/fixture/multiton/MultitonSPIFixture.java
similarity index 100%
rename from
infra/util/src/test/java/org/apache/shardingsphere/infra/util/spi/fixture/multiton/MultitonSPIFixture.java
rename to
infra/spi/src/test/java/org/apache/shardingsphere/infra/util/spi/fixture/multiton/MultitonSPIFixture.java
diff --git
a/infra/util/src/test/java/org/apache/shardingsphere/infra/util/spi/fixture/multiton/impl/MultitonSPIFixtureImpl.java
b/infra/spi/src/test/java/org/apache/shardingsphere/infra/util/spi/fixture/multiton/impl/MultitonSPIFixtureImpl.java
similarity index 100%
rename from
infra/util/src/test/java/org/apache/shardingsphere/infra/util/spi/fixture/multiton/impl/MultitonSPIFixtureImpl.java
rename to
infra/spi/src/test/java/org/apache/shardingsphere/infra/util/spi/fixture/multiton/impl/MultitonSPIFixtureImpl.java
diff --git
a/infra/util/src/test/java/org/apache/shardingsphere/infra/util/spi/fixture/singleton/SingletonSPIFixture.java
b/infra/spi/src/test/java/org/apache/shardingsphere/infra/util/spi/fixture/singleton/SingletonSPIFixture.java
similarity index 100%
rename from
infra/util/src/test/java/org/apache/shardingsphere/infra/util/spi/fixture/singleton/SingletonSPIFixture.java
rename to
infra/spi/src/test/java/org/apache/shardingsphere/infra/util/spi/fixture/singleton/SingletonSPIFixture.java
diff --git
a/infra/util/src/test/java/org/apache/shardingsphere/infra/util/spi/fixture/singleton/impl/SingletonSPIFixtureImpl.java
b/infra/spi/src/test/java/org/apache/shardingsphere/infra/util/spi/fixture/singleton/impl/SingletonSPIFixtureImpl.java
similarity index 100%
rename from
infra/util/src/test/java/org/apache/shardingsphere/infra/util/spi/fixture/singleton/impl/SingletonSPIFixtureImpl.java
rename to
infra/spi/src/test/java/org/apache/shardingsphere/infra/util/spi/fixture/singleton/impl/SingletonSPIFixtureImpl.java
diff --git
a/infra/util/src/test/java/org/apache/shardingsphere/infra/util/spi/type/ordered/OrderedSPILoaderTest.java
b/infra/spi/src/test/java/org/apache/shardingsphere/infra/util/spi/type/ordered/OrderedSPILoaderTest.java
similarity index 100%
rename from
infra/util/src/test/java/org/apache/shardingsphere/infra/util/spi/type/ordered/OrderedSPILoaderTest.java
rename to
infra/spi/src/test/java/org/apache/shardingsphere/infra/util/spi/type/ordered/OrderedSPILoaderTest.java
diff --git
a/infra/util/src/test/java/org/apache/shardingsphere/infra/util/spi/type/ordered/cache/OrderedServicesCacheTest.java
b/infra/spi/src/test/java/org/apache/shardingsphere/infra/util/spi/type/ordered/cache/OrderedServicesCacheTest.java
similarity index 100%
rename from
infra/util/src/test/java/org/apache/shardingsphere/infra/util/spi/type/ordered/cache/OrderedServicesCacheTest.java
rename to
infra/spi/src/test/java/org/apache/shardingsphere/infra/util/spi/type/ordered/cache/OrderedServicesCacheTest.java
diff --git
a/infra/util/src/test/java/org/apache/shardingsphere/infra/util/spi/type/ordered/fixture/OrderedInterfaceFixture.java
b/infra/spi/src/test/java/org/apache/shardingsphere/infra/util/spi/type/ordered/fixture/OrderedInterfaceFixture.java
similarity index 100%
rename from
infra/util/src/test/java/org/apache/shardingsphere/infra/util/spi/type/ordered/fixture/OrderedInterfaceFixture.java
rename to
infra/spi/src/test/java/org/apache/shardingsphere/infra/util/spi/type/ordered/fixture/OrderedInterfaceFixture.java
diff --git
a/infra/util/src/test/java/org/apache/shardingsphere/infra/util/spi/type/ordered/fixture/OrderedSPIFixture.java
b/infra/spi/src/test/java/org/apache/shardingsphere/infra/util/spi/type/ordered/fixture/OrderedSPIFixture.java
similarity index 100%
rename from
infra/util/src/test/java/org/apache/shardingsphere/infra/util/spi/type/ordered/fixture/OrderedSPIFixture.java
rename to
infra/spi/src/test/java/org/apache/shardingsphere/infra/util/spi/type/ordered/fixture/OrderedSPIFixture.java
diff --git
a/infra/util/src/test/java/org/apache/shardingsphere/infra/util/spi/type/ordered/fixture/impl/OrderedInterfaceFixtureImpl.java
b/infra/spi/src/test/java/org/apache/shardingsphere/infra/util/spi/type/ordered/fixture/impl/OrderedInterfaceFixtureImpl.java
similarity index 100%
rename from
infra/util/src/test/java/org/apache/shardingsphere/infra/util/spi/type/ordered/fixture/impl/OrderedInterfaceFixtureImpl.java
rename to
infra/spi/src/test/java/org/apache/shardingsphere/infra/util/spi/type/ordered/fixture/impl/OrderedInterfaceFixtureImpl.java
diff --git
a/infra/util/src/test/java/org/apache/shardingsphere/infra/util/spi/type/ordered/fixture/impl/OrderedSPIFixtureImpl.java
b/infra/spi/src/test/java/org/apache/shardingsphere/infra/util/spi/type/ordered/fixture/impl/OrderedSPIFixtureImpl.java
similarity index 100%
rename from
infra/util/src/test/java/org/apache/shardingsphere/infra/util/spi/type/ordered/fixture/impl/OrderedSPIFixtureImpl.java
rename to
infra/spi/src/test/java/org/apache/shardingsphere/infra/util/spi/type/ordered/fixture/impl/OrderedSPIFixtureImpl.java
diff --git
a/infra/util/src/test/java/org/apache/shardingsphere/infra/util/spi/type/typed/TypedSPILoaderTest.java
b/infra/spi/src/test/java/org/apache/shardingsphere/infra/util/spi/type/typed/TypedSPILoaderTest.java
similarity index 100%
rename from
infra/util/src/test/java/org/apache/shardingsphere/infra/util/spi/type/typed/TypedSPILoaderTest.java
rename to
infra/spi/src/test/java/org/apache/shardingsphere/infra/util/spi/type/typed/TypedSPILoaderTest.java
diff --git
a/infra/util/src/test/java/org/apache/shardingsphere/infra/util/spi/type/typed/fixture/TypedSPIFixture.java
b/infra/spi/src/test/java/org/apache/shardingsphere/infra/util/spi/type/typed/fixture/TypedSPIFixture.java
similarity index 100%
copy from
infra/util/src/test/java/org/apache/shardingsphere/infra/util/spi/type/typed/fixture/TypedSPIFixture.java
copy to
infra/spi/src/test/java/org/apache/shardingsphere/infra/util/spi/type/typed/fixture/TypedSPIFixture.java
diff --git
a/infra/util/src/test/java/org/apache/shardingsphere/infra/util/spi/type/typed/fixture/impl/TypedSPIFixtureImpl.java
b/infra/spi/src/test/java/org/apache/shardingsphere/infra/util/spi/type/typed/fixture/impl/TypedSPIFixtureImpl.java
similarity index 100%
rename from
infra/util/src/test/java/org/apache/shardingsphere/infra/util/spi/type/typed/fixture/impl/TypedSPIFixtureImpl.java
rename to
infra/spi/src/test/java/org/apache/shardingsphere/infra/util/spi/type/typed/fixture/impl/TypedSPIFixtureImpl.java
diff --git
a/infra/util/src/test/resources/META-INF/services/org.apache.shardingsphere.infra.util.spi.fixture.multiton.MultitonSPIFixture
b/infra/spi/src/test/resources/META-INF/services/org.apache.shardingsphere.infra.util.spi.fixture.multiton.MultitonSPIFixture
similarity index 100%
rename from
infra/util/src/test/resources/META-INF/services/org.apache.shardingsphere.infra.util.spi.fixture.multiton.MultitonSPIFixture
rename to
infra/spi/src/test/resources/META-INF/services/org.apache.shardingsphere.infra.util.spi.fixture.multiton.MultitonSPIFixture
diff --git
a/infra/util/src/test/resources/META-INF/services/org.apache.shardingsphere.infra.util.spi.fixture.singleton.SingletonSPIFixture
b/infra/spi/src/test/resources/META-INF/services/org.apache.shardingsphere.infra.util.spi.fixture.singleton.SingletonSPIFixture
similarity index 100%
rename from
infra/util/src/test/resources/META-INF/services/org.apache.shardingsphere.infra.util.spi.fixture.singleton.SingletonSPIFixture
rename to
infra/spi/src/test/resources/META-INF/services/org.apache.shardingsphere.infra.util.spi.fixture.singleton.SingletonSPIFixture
diff --git
a/infra/util/src/test/resources/META-INF/services/org.apache.shardingsphere.infra.util.spi.type.ordered.fixture.OrderedSPIFixture
b/infra/spi/src/test/resources/META-INF/services/org.apache.shardingsphere.infra.util.spi.type.ordered.fixture.OrderedSPIFixture
similarity index 100%
rename from
infra/util/src/test/resources/META-INF/services/org.apache.shardingsphere.infra.util.spi.type.ordered.fixture.OrderedSPIFixture
rename to
infra/spi/src/test/resources/META-INF/services/org.apache.shardingsphere.infra.util.spi.type.ordered.fixture.OrderedSPIFixture
diff --git
a/infra/util/src/test/resources/META-INF/services/org.apache.shardingsphere.infra.util.spi.type.typed.fixture.TypedSPIFixture
b/infra/spi/src/test/resources/META-INF/services/org.apache.shardingsphere.infra.util.spi.type.typed.fixture.TypedSPIFixture
similarity index 100%
copy from
infra/util/src/test/resources/META-INF/services/org.apache.shardingsphere.infra.util.spi.type.typed.fixture.TypedSPIFixture
copy to
infra/spi/src/test/resources/META-INF/services/org.apache.shardingsphere.infra.util.spi.type.typed.fixture.TypedSPIFixture
diff --git a/infra/util/pom.xml b/infra/util/pom.xml
index 496db15d5d0..4ec4a5219a7 100644
--- a/infra/util/pom.xml
+++ b/infra/util/pom.xml
@@ -26,6 +26,12 @@
<artifactId>shardingsphere-infra-util</artifactId>
<dependencies>
+ <dependency>
+ <groupId>org.apache.shardingsphere</groupId>
+ <artifactId>shardingsphere-infra-spi</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+
<dependency>
<groupId>org.yaml</groupId>
<artifactId>snakeyaml</artifactId>
diff --git
a/infra/util/src/test/java/org/apache/shardingsphere/infra/util/props/TypedPropertyValueTest.java
b/infra/util/src/test/java/org/apache/shardingsphere/infra/util/props/TypedPropertyValueTest.java
index b1087bc0b1b..89e9e33787c 100644
---
a/infra/util/src/test/java/org/apache/shardingsphere/infra/util/props/TypedPropertyValueTest.java
+++
b/infra/util/src/test/java/org/apache/shardingsphere/infra/util/props/TypedPropertyValueTest.java
@@ -18,10 +18,10 @@
package org.apache.shardingsphere.infra.util.props;
import
org.apache.shardingsphere.infra.util.props.exception.TypedPropertyValueException;
-import
org.apache.shardingsphere.infra.util.props.fixture.TypedPropertyEnumFixture;
+import
org.apache.shardingsphere.infra.util.props.fixture.enums.TypedPropertyEnumFixture;
import
org.apache.shardingsphere.infra.util.props.fixture.TypedPropertyKeyFixture;
+import
org.apache.shardingsphere.infra.util.props.fixture.typed.PropertiesTypedSPIFixture;
import org.apache.shardingsphere.infra.util.spi.type.typed.TypedSPILoader;
-import
org.apache.shardingsphere.infra.util.spi.type.typed.fixture.TypedSPIFixture;
import org.junit.jupiter.api.Test;
import static org.hamcrest.CoreMatchers.is;
@@ -82,6 +82,6 @@ class TypedPropertyValueTest {
@Test
void assertGetTypedSPI() throws TypedPropertyValueException {
- assertThat(new
TypedPropertyValue(TypedPropertyKeyFixture.TYPED_SPI_VALUE,
"TYPED.FIXTURE").getValue(),
is(TypedSPILoader.getService(TypedSPIFixture.class, "TYPED.FIXTURE")));
+ assertThat(new
TypedPropertyValue(TypedPropertyKeyFixture.TYPED_SPI_VALUE,
"TYPED.SPI.PROPS").getValue(),
is(TypedSPILoader.getService(PropertiesTypedSPIFixture.class,
"TYPED.SPI.PROPS")));
}
}
diff --git
a/infra/util/src/test/java/org/apache/shardingsphere/infra/util/props/fixture/TypedPropertyKeyFixture.java
b/infra/util/src/test/java/org/apache/shardingsphere/infra/util/props/fixture/TypedPropertyKeyFixture.java
index 8c5c0f1453f..1ba950b0377 100644
---
a/infra/util/src/test/java/org/apache/shardingsphere/infra/util/props/fixture/TypedPropertyKeyFixture.java
+++
b/infra/util/src/test/java/org/apache/shardingsphere/infra/util/props/fixture/TypedPropertyKeyFixture.java
@@ -20,7 +20,8 @@ package org.apache.shardingsphere.infra.util.props.fixture;
import lombok.Getter;
import lombok.RequiredArgsConstructor;
import org.apache.shardingsphere.infra.util.props.TypedPropertyKey;
-import
org.apache.shardingsphere.infra.util.spi.type.typed.fixture.TypedSPIFixture;
+import
org.apache.shardingsphere.infra.util.props.fixture.enums.TypedPropertyEnumFixture;
+import
org.apache.shardingsphere.infra.util.props.fixture.typed.PropertiesTypedSPIFixture;
@RequiredArgsConstructor
@Getter
@@ -42,7 +43,7 @@ public enum TypedPropertyKeyFixture implements
TypedPropertyKey {
ENUM_VALUE("enum", TypedPropertyEnumFixture.FOO.name(),
TypedPropertyEnumFixture.class),
- TYPED_SPI_VALUE("typed_spi", "TYPED.FIXTURE", TypedSPIFixture.class);
+ TYPED_SPI_VALUE("typed_spi", "TYPED.SPI.PROPS",
PropertiesTypedSPIFixture.class);
private final String key;
diff --git
a/infra/util/src/test/java/org/apache/shardingsphere/infra/util/props/fixture/TypedPropertyEnumFixture.java
b/infra/util/src/test/java/org/apache/shardingsphere/infra/util/props/fixture/enums/TypedPropertyEnumFixture.java
similarity index 92%
copy from
infra/util/src/test/java/org/apache/shardingsphere/infra/util/props/fixture/TypedPropertyEnumFixture.java
copy to
infra/util/src/test/java/org/apache/shardingsphere/infra/util/props/fixture/enums/TypedPropertyEnumFixture.java
index 4b904822102..8e7d6e6c439 100644
---
a/infra/util/src/test/java/org/apache/shardingsphere/infra/util/props/fixture/TypedPropertyEnumFixture.java
+++
b/infra/util/src/test/java/org/apache/shardingsphere/infra/util/props/fixture/enums/TypedPropertyEnumFixture.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-package org.apache.shardingsphere.infra.util.props.fixture;
+package org.apache.shardingsphere.infra.util.props.fixture.enums;
public enum TypedPropertyEnumFixture {
diff --git
a/infra/util/src/test/java/org/apache/shardingsphere/infra/util/spi/type/typed/fixture/TypedSPIFixture.java
b/infra/util/src/test/java/org/apache/shardingsphere/infra/util/props/fixture/typed/PropertiesTypedSPIFixture.java
similarity index 88%
rename from
infra/util/src/test/java/org/apache/shardingsphere/infra/util/spi/type/typed/fixture/TypedSPIFixture.java
rename to
infra/util/src/test/java/org/apache/shardingsphere/infra/util/props/fixture/typed/PropertiesTypedSPIFixture.java
index b78bc40ed42..1b8e17d210e 100644
---
a/infra/util/src/test/java/org/apache/shardingsphere/infra/util/spi/type/typed/fixture/TypedSPIFixture.java
+++
b/infra/util/src/test/java/org/apache/shardingsphere/infra/util/props/fixture/typed/PropertiesTypedSPIFixture.java
@@ -15,11 +15,11 @@
* limitations under the License.
*/
-package org.apache.shardingsphere.infra.util.spi.type.typed.fixture;
+package org.apache.shardingsphere.infra.util.props.fixture.typed;
import org.apache.shardingsphere.infra.util.spi.annotation.SingletonSPI;
import org.apache.shardingsphere.infra.util.spi.type.typed.TypedSPI;
@SingletonSPI
-public interface TypedSPIFixture extends TypedSPI {
+public interface PropertiesTypedSPIFixture extends TypedSPI {
}
diff --git
a/infra/util/src/test/java/org/apache/shardingsphere/infra/util/props/fixture/TypedPropertyEnumFixture.java
b/infra/util/src/test/java/org/apache/shardingsphere/infra/util/props/fixture/typed/PropertiesTypedSPIFixtureImpl.java
similarity index 77%
rename from
infra/util/src/test/java/org/apache/shardingsphere/infra/util/props/fixture/TypedPropertyEnumFixture.java
rename to
infra/util/src/test/java/org/apache/shardingsphere/infra/util/props/fixture/typed/PropertiesTypedSPIFixtureImpl.java
index 4b904822102..1a208fcec72 100644
---
a/infra/util/src/test/java/org/apache/shardingsphere/infra/util/props/fixture/TypedPropertyEnumFixture.java
+++
b/infra/util/src/test/java/org/apache/shardingsphere/infra/util/props/fixture/typed/PropertiesTypedSPIFixtureImpl.java
@@ -15,9 +15,12 @@
* limitations under the License.
*/
-package org.apache.shardingsphere.infra.util.props.fixture;
+package org.apache.shardingsphere.infra.util.props.fixture.typed;
-public enum TypedPropertyEnumFixture {
+public final class PropertiesTypedSPIFixtureImpl implements
PropertiesTypedSPIFixture {
- FOO
+ @Override
+ public String getType() {
+ return "TYPED.SPI.PROPS";
+ }
}
diff --git
a/infra/util/src/test/resources/META-INF/services/org.apache.shardingsphere.infra.util.spi.type.typed.fixture.TypedSPIFixture
b/infra/util/src/test/resources/META-INF/services/org.apache.shardingsphere.infra.util.props.fixture.typed.PropertiesTypedSPIFixture
similarity index 90%
rename from
infra/util/src/test/resources/META-INF/services/org.apache.shardingsphere.infra.util.spi.type.typed.fixture.TypedSPIFixture
rename to
infra/util/src/test/resources/META-INF/services/org.apache.shardingsphere.infra.util.props.fixture.typed.PropertiesTypedSPIFixture
index 1b83660944d..046e45d5e2e 100644
---
a/infra/util/src/test/resources/META-INF/services/org.apache.shardingsphere.infra.util.spi.type.typed.fixture.TypedSPIFixture
+++
b/infra/util/src/test/resources/META-INF/services/org.apache.shardingsphere.infra.util.props.fixture.typed.PropertiesTypedSPIFixture
@@ -15,4 +15,4 @@
# limitations under the License.
#
-org.apache.shardingsphere.infra.util.spi.type.typed.fixture.impl.TypedSPIFixtureImpl
+org.apache.shardingsphere.infra.util.props.fixture.typed.PropertiesTypedSPIFixtureImpl