Skip to content

Commit b61b80d

Browse files
committed
feat: add lazy spi loader
1 parent 3151569 commit b61b80d

File tree

9 files changed

+18
-9
lines changed

9 files changed

+18
-9
lines changed

examples/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
<parent>
2424
<artifactId>capa-parent</artifactId>
2525
<groupId>group.rxcloud</groupId>
26-
<version>1.10.12.RELEASE</version>
26+
<version>1.10.12.2.RELEASE</version>
2727
</parent>
2828

2929
<artifactId>capa-examples</artifactId>

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
<groupId>group.rxcloud</groupId>
2424
<artifactId>capa-parent</artifactId>
2525
<packaging>pom</packaging>
26-
<version>1.10.12.RELEASE</version>
26+
<version>1.10.12.2.RELEASE</version>
2727
<name>capa-sdk-parent</name>
2828
<description>SDK for Capa.</description>
2929
<url>https://github.com/reactivegroup</url>

sdk-component/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
<parent>
2424
<groupId>group.rxcloud</groupId>
2525
<artifactId>capa-parent</artifactId>
26-
<version>1.10.12.RELEASE</version>
26+
<version>1.10.12.2.RELEASE</version>
2727
</parent>
2828

2929
<artifactId>capa-sdk-component</artifactId>

sdk-infrastructure/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
<parent>
2424
<artifactId>capa-parent</artifactId>
2525
<groupId>group.rxcloud</groupId>
26-
<version>1.10.12.RELEASE</version>
26+
<version>1.10.12.2.RELEASE</version>
2727
</parent>
2828

2929
<artifactId>capa-sdk-infrastructure</artifactId>

sdk-spi-demo/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
<parent>
2424
<artifactId>capa-parent</artifactId>
2525
<groupId>group.rxcloud</groupId>
26-
<version>1.10.12.RELEASE</version>
26+
<version>1.10.12.2.RELEASE</version>
2727
</parent>
2828

2929
<artifactId>capa-sdk-spi-demo</artifactId>

sdk-spi/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
<parent>
2424
<artifactId>capa-parent</artifactId>
2525
<groupId>group.rxcloud</groupId>
26-
<version>1.10.12.RELEASE</version>
26+
<version>1.10.12.2.RELEASE</version>
2727
</parent>
2828

2929
<artifactId>capa-sdk-spi</artifactId>

sdk-spi/src/main/java/group/rxcloud/capa/spi/http/config/CapaSpiProperties.java

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,22 @@
2323
*/
2424
public abstract class CapaSpiProperties {
2525

26+
private static volatile CapaSpiOptionsLoader instance;
27+
2628
/**
2729
* Gets default options loader.
2830
*
2931
* @return the default options loader
3032
*/
3133
public static CapaSpiOptionsLoader getSpiOptionsLoader() {
34+
if (instance == null) {
35+
synchronized (CapaSpiProperties.class) {
36+
if (instance == null) {
37+
instance = CapaClassLoader.loadComponentClassObj("rpc-common", CapaSpiOptionsLoader.class);
38+
}
39+
}
40+
}
3241
// load spi rpc impl
33-
return CapaClassLoader.loadComponentClassObj("rpc-common", CapaSpiOptionsLoader.class);
42+
return instance;
3443
}
3544
}

sdk-springboot/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
<parent>
2424
<artifactId>capa-parent</artifactId>
2525
<groupId>group.rxcloud</groupId>
26-
<version>1.10.12.RELEASE</version>
26+
<version>1.10.12.2.RELEASE</version>
2727
</parent>
2828

2929
<artifactId>sdk-springboot</artifactId>

sdk/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
<parent>
2424
<groupId>group.rxcloud</groupId>
2525
<artifactId>capa-parent</artifactId>
26-
<version>1.10.12.RELEASE</version>
26+
<version>1.10.12.2.RELEASE</version>
2727
</parent>
2828

2929
<artifactId>capa-sdk</artifactId>

0 commit comments

Comments
 (0)