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..c48622247b0b606244a7192f629abc19a68ce5f4 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 @@ -15,7 +15,6 @@ import org.springframework.boot.autoconfigure.SpringBootApplication; public class Application implements SpringBootstrap { public static void main(String[] args) { - //System.setProperty("org.graalvm.nativeimage.imagecode", "111"); 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..3b660f10485965b618dc7ea2a6a444e9bbb2e2ca 100644 --- a/example-main/src/main/resources/application-dev.yml +++ b/example-main/src/main/resources/application-dev.yml @@ -22,7 +22,7 @@ mybatis-plus: log-impl: org.apache.ibatis.logging.stdout.StdOutImpl plugin: - runMode: dev + runMode: prod mainPackage: com.gitee.starblues.example # 如果配置是 windows 下路径, mac、linux 自行修改 pluginPath: 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