From 0bb19e7f625255a6517289e322ad63589d7361c0 Mon Sep 17 00:00:00 2001 From: icanci Date: Wed, 6 Jul 2022 11:13:34 +0800 Subject: [PATCH 1/2] feat:icanci:dev_v1_init_project --- README.md | 33 ++++++--------------------------- pom.xml | 5 +++++ rec-common/pom.xml | 19 +++++++++++++++++++ rec-spi/pom.xml | 19 +++++++++++++++++++ 4 files changed, 49 insertions(+), 27 deletions(-) create mode 100644 rec-common/pom.xml create mode 100644 rec-spi/pom.xml diff --git a/README.md b/README.md index 3c16ebd..5f91e80 100644 --- a/README.md +++ b/README.md @@ -1,37 +1,16 @@ # REC-规则引擎组件 #### 介绍 -REC(Rule engine component)-规则引擎组件:提供统一的规则处理方式和策略。 +REC(Rule engine component)规则引擎组件:提供统一的规则处理方式和策略。 #### 软件架构 软件架构说明 +#### 分支迭代说明 -#### 安装教程 +dev_v1_init_project:项目初始化,构建基础模块、结构、依赖等 -1. xxxx -2. xxxx -3. xxxx -#### 使用说明 - -1. xxxx -2. xxxx -3. xxxx - -#### 参与贡献 - -1. Fork 本仓库 -2. 新建 Feat_xxx 分支 -3. 提交代码 -4. 新建 Pull Request - - -#### 特技 - -1. 使用 Readme\_XXX.md 来支持不同的语言,例如 Readme\_en.md, Readme\_zh.md -2. Gitee 官方博客 [blog.gitee.com](https://blog.gitee.com) -3. 你可以 [https://gitee.com/explore](https://gitee.com/explore) 这个地址来了解 Gitee 上的优秀开源项目 -4. [GVP](https://gitee.com/gvp) 全称是 Gitee 最有价值开源项目,是综合评定出的优秀开源项目 -5. Gitee 官方提供的使用手册 [https://gitee.com/help](https://gitee.com/help) -6. Gitee 封面人物是一档用来展示 Gitee 会员风采的栏目 [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/) +#### 项目模块说明 +rec-spi:提供统一的核心构件规范 +rec-common:提供公共工具类 \ No newline at end of file diff --git a/pom.xml b/pom.xml index 4c3bea7..0938087 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,12 @@ cn.icanci.rec rec-parent + pom 1.0-SNAPSHOT + + rec-spi + rec-common + 8 diff --git a/rec-common/pom.xml b/rec-common/pom.xml new file mode 100644 index 0000000..95630f2 --- /dev/null +++ b/rec-common/pom.xml @@ -0,0 +1,19 @@ + + + + rec-parent + cn.icanci.rec + 1.0-SNAPSHOT + + 4.0.0 + + rec-common + + + 8 + 8 + + + \ No newline at end of file diff --git a/rec-spi/pom.xml b/rec-spi/pom.xml new file mode 100644 index 0000000..929b7de --- /dev/null +++ b/rec-spi/pom.xml @@ -0,0 +1,19 @@ + + + + rec-parent + cn.icanci.rec + 1.0-SNAPSHOT + + 4.0.0 + + rec-spi + + + 8 + 8 + + + \ No newline at end of file -- Gitee From 7dff82062f0fa5a8ec4dc818ef62fb0796ee605d Mon Sep 17 00:00:00 2001 From: icanci Date: Thu, 7 Jul 2022 13:39:13 +0800 Subject: [PATCH 2/2] =?UTF-8?q?feat:icanci:=E9=A1=B9=E7=9B=AE=E7=BB=93?= =?UTF-8?q?=E6=9E=84=E8=AE=BE=E8=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 10 +- pom.xml | 242 +++++++++++++++++- rec-bom/pom.xml | 38 +++ rec-common/pom.xml | 2 +- .../cn/icanci/rec/common/package-info.java | 5 + rec-spi/pom.xml | 9 +- .../java/cn/icanci/rec/spi/package-info.java | 5 + rec-spring-boot-starter/pom.xml | 39 +++ .../starter/config/RecContextAutoConfig.java | 32 +++ .../cn/icanci/rec/starter/package-info.java | 5 + .../main/resources/META-INF/spring.factories | 1 + 11 files changed, 382 insertions(+), 6 deletions(-) create mode 100644 rec-bom/pom.xml create mode 100644 rec-common/src/main/java/cn/icanci/rec/common/package-info.java create mode 100644 rec-spi/src/main/java/cn/icanci/rec/spi/package-info.java create mode 100644 rec-spring-boot-starter/pom.xml create mode 100644 rec-spring-boot-starter/src/main/java/cn/icanci/rec/starter/config/RecContextAutoConfig.java create mode 100644 rec-spring-boot-starter/src/main/java/cn/icanci/rec/starter/package-info.java create mode 100755 rec-spring-boot-starter/src/main/resources/META-INF/spring.factories diff --git a/README.md b/README.md index 5f91e80..2e42e56 100644 --- a/README.md +++ b/README.md @@ -1,16 +1,20 @@ # REC-规则引擎组件 #### 介绍 + REC(Rule engine component)规则引擎组件:提供统一的规则处理方式和策略。 #### 软件架构 + 软件架构说明 #### 分支迭代说明 dev_v1_init_project:项目初始化,构建基础模块、结构、依赖等 - #### 项目模块说明 -rec-spi:提供统一的核心构件规范 -rec-common:提供公共工具类 \ No newline at end of file + +- rec-bom:bom包,管理所有 +- rec-spi:提供统一的核心构件规范 +- rec-common:提供公共工具类 +- rec-spring-boot-starter:SpringBoot启动器 \ No newline at end of file diff --git a/pom.xml b/pom.xml index 0938087..3d19817 100644 --- a/pom.xml +++ b/pom.xml @@ -7,15 +7,255 @@ cn.icanci.rec rec-parent pom - 1.0-SNAPSHOT + ${revision} rec-spi rec-common + rec-spring-boot-starter + rec-bom + + 1.0.0.0-SNAPSHOT + + 1.8 + UTF-8 8 8 + + 2.2.2.RELEASE + + 3.4 + 4.3 + 19.0 + + 4.13.2 + + 1.7.30 + 2.12.1 + 2.13.3 + 2.13.3 + 3.3.4 + + 2.11.2 + 1.2.70 + + 1.4.2.Final + + + + + org.springframework.boot + spring-boot-dependencies + + + org.springframework.boot + spring-boot-starter-logging + + + ${spring.boot.version} + import + pom + + + + org.apache.commons + commons-lang3 + ${commons.lang3.version} + + + org.apache.commons + commons-collections4 + ${commons.collections4.version} + + + com.google.guava + guava + ${guava.version} + + + + com.fasterxml.jackson.core + jackson-core + ${jackson.version} + + + com.alibaba + fastjson + ${fastjson.version} + + + com.fasterxml.jackson.core + jackson-annotations + ${jackson.version} + + + com.fasterxml.jackson.core + jackson-databind + ${jackson.version} + + + + junit + junit + ${junit.version} + test + + + + + org.slf4j + slf4j-api + ${org.slf4j.version} + + + + org.apache.logging.log4j + log4j-slf4j-impl + ${log4j-slf4j-impl.version} + + + + org.apache.logging.log4j + log4j-api + ${log4j-api.version} + + + + org.apache.logging.log4j + log4j-core + ${log4j-core.version} + + + + com.lmax + disruptor + ${disruptor.version} + + + + org.mapstruct + mapstruct + ${mapstruct.version} + + + + + + + + org.slf4j + slf4j-api + + + + org.apache.logging.log4j + log4j-slf4j-impl + + + + org.apache.logging.log4j + log4j-api + + + + org.apache.logging.log4j + log4j-core + + + + com.lmax + disruptor + + + org.springframework.boot + spring-boot-starter-log4j2 + + + junit + junit + test + + + com.fasterxml.jackson.core + jackson-core + + + com.alibaba + fastjson + + + com.fasterxml.jackson.core + jackson-annotations + + + com.fasterxml.jackson.core + jackson-databind + + + + + + + org.codehaus.mojo + flatten-maven-plugin + 1.2.7 + + clean + true + + remove + remove + + ${project.build.directory}/flattened + + + + flatten + process-resources + + flatten + + + + flatten.clean + clean + + clean + + + + + + org.apache.maven.plugins + maven-source-plugin + 3.0.1 + + + attach-sources + verify + + jar-no-fork + + + + + + + + + + org.codehaus.mojo + flatten-maven-plugin + + + + org.apache.maven.plugins + maven-source-plugin + + + \ No newline at end of file diff --git a/rec-bom/pom.xml b/rec-bom/pom.xml new file mode 100644 index 0000000..9373caa --- /dev/null +++ b/rec-bom/pom.xml @@ -0,0 +1,38 @@ + + + + rec-parent + cn.icanci.rec + ${revision} + + 4.0.0 + + rec-bom + + + 8 + 8 + + + + + + cn.icanci.rec + rec-common + ${revision} + + + cn.icanci.rec + rec-spi + ${revision} + + + cn.icanci.rec + rec-spring-boot-starter + ${revision} + + + + \ No newline at end of file diff --git a/rec-common/pom.xml b/rec-common/pom.xml index 95630f2..fb3e314 100644 --- a/rec-common/pom.xml +++ b/rec-common/pom.xml @@ -5,7 +5,7 @@ rec-parent cn.icanci.rec - 1.0-SNAPSHOT + ${revision} 4.0.0 diff --git a/rec-common/src/main/java/cn/icanci/rec/common/package-info.java b/rec-common/src/main/java/cn/icanci/rec/common/package-info.java new file mode 100644 index 0000000..a2089f2 --- /dev/null +++ b/rec-common/src/main/java/cn/icanci/rec/common/package-info.java @@ -0,0 +1,5 @@ +/** + * @author icanci + * @since 1.0 Created in 2022/07/06 23:02 + */ +package cn.icanci.rec.common; \ No newline at end of file diff --git a/rec-spi/pom.xml b/rec-spi/pom.xml index 929b7de..511f9dd 100644 --- a/rec-spi/pom.xml +++ b/rec-spi/pom.xml @@ -5,7 +5,7 @@ rec-parent cn.icanci.rec - 1.0-SNAPSHOT + ${revision} 4.0.0 @@ -16,4 +16,11 @@ 8 + + + + org.springframework.boot + spring-boot-starter-web + + \ No newline at end of file diff --git a/rec-spi/src/main/java/cn/icanci/rec/spi/package-info.java b/rec-spi/src/main/java/cn/icanci/rec/spi/package-info.java new file mode 100644 index 0000000..df091e9 --- /dev/null +++ b/rec-spi/src/main/java/cn/icanci/rec/spi/package-info.java @@ -0,0 +1,5 @@ +/** + * @author icanci + * @since 1.0 Created in 2022/07/06 23:03 + */ +package cn.icanci.rec.spi; \ No newline at end of file diff --git a/rec-spring-boot-starter/pom.xml b/rec-spring-boot-starter/pom.xml new file mode 100644 index 0000000..27dffab --- /dev/null +++ b/rec-spring-boot-starter/pom.xml @@ -0,0 +1,39 @@ + + + + rec-parent + cn.icanci.rec + ${revision} + + 4.0.0 + + rec-spring-boot-starter + + + 8 + 8 + + + + + org.springframework.boot + spring-boot-configuration-processor + true + + + org.springframework.boot + spring-boot-starter + + + org.springframework.boot + spring-boot-autoconfigure + + + cn.icanci.rec + rec-spi + ${revision} + + + \ No newline at end of file diff --git a/rec-spring-boot-starter/src/main/java/cn/icanci/rec/starter/config/RecContextAutoConfig.java b/rec-spring-boot-starter/src/main/java/cn/icanci/rec/starter/config/RecContextAutoConfig.java new file mode 100644 index 0000000..e06efe5 --- /dev/null +++ b/rec-spring-boot-starter/src/main/java/cn/icanci/rec/starter/config/RecContextAutoConfig.java @@ -0,0 +1,32 @@ +package cn.icanci.rec.starter.config; + +import org.springframework.beans.BeansException; +import org.springframework.boot.CommandLineRunner; +import org.springframework.context.ApplicationContext; +import org.springframework.context.ApplicationContextAware; +import org.springframework.context.annotation.Configuration; + +/** + * TODO Spring启动器 + * + * @author icanci + * @since 1.0 Created in 2022/07/06 23:05 + */ +@Configuration +public class RecContextAutoConfig implements ApplicationContextAware, CommandLineRunner { + + /** + * Spring 上下文 + */ + private ApplicationContext context; + + @Override + public void run(String... args) throws Exception { + + } + + @Override + public void setApplicationContext(ApplicationContext applicationContext) throws BeansException { + context = applicationContext; + } +} diff --git a/rec-spring-boot-starter/src/main/java/cn/icanci/rec/starter/package-info.java b/rec-spring-boot-starter/src/main/java/cn/icanci/rec/starter/package-info.java new file mode 100644 index 0000000..5f46430 --- /dev/null +++ b/rec-spring-boot-starter/src/main/java/cn/icanci/rec/starter/package-info.java @@ -0,0 +1,5 @@ +/** + * @author icanci + * @since 1.0 Created in 2022/07/06 23:04 + */ +package cn.icanci.rec.starter; \ No newline at end of file diff --git a/rec-spring-boot-starter/src/main/resources/META-INF/spring.factories b/rec-spring-boot-starter/src/main/resources/META-INF/spring.factories new file mode 100755 index 0000000..f188766 --- /dev/null +++ b/rec-spring-boot-starter/src/main/resources/META-INF/spring.factories @@ -0,0 +1 @@ +org.springframework.boot.autoconfigure.EnableAutoConfiguration=cn.icanci.rec.starter.config \ No newline at end of file -- Gitee