diff --git a/README.md b/README.md
index 20c73094a4f594738c9bb55253c84d56f16343a3..b689b4b9c4ef0cc0b24b3c4d26117e3ee0e6810c 100644
--- a/README.md
+++ b/README.md
@@ -12,6 +12,12 @@
3. 打包插件: `mvn clean package`
4. 进入主程序`example-main` 启动 `Application`
+
+#### 打包生产环境插件包命令
+`mvn clean package -P prod`
+
+`windows`测试可参考: `package.bat`
+
#### 目录说明
```properties
example-main: 主程序
diff --git a/example-main/pom.xml b/example-main/pom.xml
index 087dff20b1263cbb74a900e340cc82cacf065352..ed883ccbdac927faec793371a38d1c11aa03fe5c 100644
--- a/example-main/pom.xml
+++ b/example-main/pom.xml
@@ -16,7 +16,7 @@
1.8
- 3.0.0
+ 3.0.1
2.5.6
@@ -107,7 +107,6 @@
-
com.gitee.starblues
spring-brick-maven-packager
diff --git a/example-main/src/main/java/com/gitee/starblues/example/Application.java b/example-main/src/main/java/com/gitee/starblues/example/Application.java
index e5ff7395cab54dd5980465195d8428641e89e4e3..9b46a545b3922a1e6d44c2efa549fc98b87d3509 100644
--- a/example-main/src/main/java/com/gitee/starblues/example/Application.java
+++ b/example-main/src/main/java/com/gitee/starblues/example/Application.java
@@ -14,8 +14,7 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
@MapperScan("com.gitee.starblues.example.mapper")
public class Application implements SpringBootstrap {
- public static void main(String[] args) {
- //System.setProperty("org.graalvm.nativeimage.imagecode", "111");
+ public static void main(String[] args){
SpringMainBootstrap.launch(Application.class, args);
}
diff --git a/example-main/src/main/java/com/gitee/starblues/example/listener/MyPluginInitializerListener.java b/example-main/src/main/java/com/gitee/starblues/example/listener/MyPluginInitializerListener.java
index 5a9719cf07ff1dc1f6ad9b8934e2b284c183ef7c..19a6deef90865cf6cf18aa1fef09c6c3f2c07fdc 100644
--- a/example-main/src/main/java/com/gitee/starblues/example/listener/MyPluginInitializerListener.java
+++ b/example-main/src/main/java/com/gitee/starblues/example/listener/MyPluginInitializerListener.java
@@ -1,6 +1,7 @@
package com.gitee.starblues.example.listener;
import com.gitee.starblues.integration.listener.PluginInitializerListener;
+import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
/**
@@ -8,19 +9,20 @@ import org.springframework.stereotype.Component;
* @version 1.0
*/
@Component
+@Slf4j
public class MyPluginInitializerListener implements PluginInitializerListener {
@Override
public void before() {
- System.out.println("初始化之前");
+ log.info("初始化之前");
}
@Override
public void complete() {
- System.out.println("初始化完成");
+ log.info("初始化完成");
}
@Override
public void failure(Throwable throwable) {
- System.out.println("初始化失败:"+throwable.getMessage());
+ log.info("初始化失败:" + throwable.getMessage());
}
}
diff --git a/example-main/src/main/resources/application-dev.yml b/example-main/src/main/resources/application-dev.yml
index cf7f39afe346aaf787f29a36055b80deb0afdd5e..af2aa5e63440a27fa2b86ce98752ed7d912d732e 100644
--- a/example-main/src/main/resources/application-dev.yml
+++ b/example-main/src/main/resources/application-dev.yml
@@ -29,4 +29,13 @@ plugin:
- ~\example-plugins-basic
#- ~\example-plugins-db
#- ~\example-plugins-cloud
-
+ sortInitPluginIds:
+ - example-basic-2
+ - example-basic-1
+ decrypt:
+ enable: true
+ className: com.gitee.starblues.common.cipher.AesPluginCipher
+ plugins:
+ - pluginId: example-basic-1
+ props:
+ secretKey: mmfvXes1XckCi8F/y9i0uQ==
diff --git a/example-main/src/main/resources/application-prod.yml b/example-main/src/main/resources/application-prod.yml
index 5aa290d33c23e4e2e2b69b7106af3d8144a1a240..4781f15fa2721e3cdda4b27b13c831ee5f537e72 100644
--- a/example-main/src/main/resources/application-prod.yml
+++ b/example-main/src/main/resources/application-prod.yml
@@ -24,3 +24,13 @@ plugin:
runMode: prod
mainPackage: com.gitee.starblues.example
pluginPath: ~\plugins
+ sortInitPluginIds:
+ - example-basic-2
+ - example-basic-1
+ decrypt:
+ enable: true
+ className: com.gitee.starblues.common.cipher.AesPluginCipher
+ plugins:
+ - pluginId: example-basic-1
+ props:
+ secretKey: mmfvXes1XckCi8F/y9i0uQ==
\ No newline at end of file
diff --git a/example-plugins-basic/example-basic-1/pom.xml b/example-plugins-basic/example-basic-1/pom.xml
index a61ff2adc715a0d7fb16ab67ab72b216c08c417a..8d971c6014db5415ece6fd658e6614340eb46ac5 100644
--- a/example-plugins-basic/example-basic-1/pom.xml
+++ b/example-plugins-basic/example-basic-1/pom.xml
@@ -24,7 +24,7 @@
example-basic-1
com.gitee.starblues.example.basic1.Basic1Plugin
- 1.0.0-SNAPSHOT
+ 1.0.0
starBlues
基本插件1
basic1-config.yaml
@@ -32,6 +32,11 @@
jar
+
+
+ mmfvXes1XckCi8F/y9i0uQ==
+
+
diff --git a/example-plugins-basic/pom.xml b/example-plugins-basic/pom.xml
index af8d7d51391ca69d6e4c9cae1b3bd2405f09029c..90c68bd6b5846860868e2e37f4c97c99852c72c0 100644
--- a/example-plugins-basic/pom.xml
+++ b/example-plugins-basic/pom.xml
@@ -22,7 +22,7 @@
4.13
2.5.6
- 3.0.0
+ 3.0.1
3.1.1
diff --git a/example-plugins-cloud/pom.xml b/example-plugins-cloud/pom.xml
index 8bde0d9b33fa4a94dd1d8f56e4e0b553927cc5fe..5f9de1e254e62a0af0c397c0cb1b615608988ab0 100644
--- a/example-plugins-cloud/pom.xml
+++ b/example-plugins-cloud/pom.xml
@@ -21,7 +21,7 @@
4.13
2.3.12.RELEASE
- 3.0.0
+ 3.0.1
3.1.1
diff --git a/example-plugins-db/pom.xml b/example-plugins-db/pom.xml
index 60e0d7d09b464006e57f2cdc6b2479f16cca958e..73038bd1689150d28483bc13bf3eb27195aecb4f 100644
--- a/example-plugins-db/pom.xml
+++ b/example-plugins-db/pom.xml
@@ -21,7 +21,7 @@
1.18.10
4.13
- 3.0.0
+ 3.0.1
2.5.6
3.1.1