diff --git a/kernel-o-monitor/README.md b/kernel-o-monitor/README.md new file mode 100644 index 000000000..1359089ca --- /dev/null +++ b/kernel-o-monitor/README.md @@ -0,0 +1 @@ +系统监控模块 diff --git a/kernel-o-monitor/monitor-api/README.md b/kernel-o-monitor/monitor-api/README.md new file mode 100644 index 000000000..cd60bfd2d --- /dev/null +++ b/kernel-o-monitor/monitor-api/README.md @@ -0,0 +1 @@ +监控模块的api diff --git a/kernel-o-monitor/monitor-api/pom.xml b/kernel-o-monitor/monitor-api/pom.xml new file mode 100644 index 000000000..76b2346b8 --- /dev/null +++ b/kernel-o-monitor/monitor-api/pom.xml @@ -0,0 +1,22 @@ + + + 4.0.0 + + + cn.stylefeng.roses + kernel-o-monitor + 1.0.0 + ../pom.xml + + + monitor-api + + jar + + + + + + diff --git a/kernel-o-monitor/monitor-api/src/main/java/cn/stylefeng/roses/kernel/monitor/api/constants/MonitorConstants.java b/kernel-o-monitor/monitor-api/src/main/java/cn/stylefeng/roses/kernel/monitor/api/constants/MonitorConstants.java new file mode 100644 index 000000000..34ae0ccfa --- /dev/null +++ b/kernel-o-monitor/monitor-api/src/main/java/cn/stylefeng/roses/kernel/monitor/api/constants/MonitorConstants.java @@ -0,0 +1,21 @@ +package cn.stylefeng.roses.kernel.monitor.api.constants; + +/** + * 监控模块常量 + * + * @author fengshuonan + * @date 2021/1/31 22:33 + */ +public interface MonitorConstants { + + /** + * 监控模块的名称 + */ + String MONITOR_MODULE_NAME = "kernel-o-monitor"; + + /** + * 异常枚举的步进值 + */ + String MONITOR_EXCEPTION_STEP_CODE = "27"; + +} diff --git a/kernel-o-monitor/monitor-api/src/main/java/cn/stylefeng/roses/kernel/monitor/api/exception/MonitorException.java b/kernel-o-monitor/monitor-api/src/main/java/cn/stylefeng/roses/kernel/monitor/api/exception/MonitorException.java new file mode 100644 index 000000000..8472177c6 --- /dev/null +++ b/kernel-o-monitor/monitor-api/src/main/java/cn/stylefeng/roses/kernel/monitor/api/exception/MonitorException.java @@ -0,0 +1,19 @@ +package cn.stylefeng.roses.kernel.monitor.api.exception; + +import cn.stylefeng.roses.kernel.monitor.api.constants.MonitorConstants; +import cn.stylefeng.roses.kernel.rule.abstracts.AbstractExceptionEnum; +import cn.stylefeng.roses.kernel.rule.exception.base.ServiceException; + +/** + * 监控模块异常 + * + * @author fengshuonan + * @date 2021/1/31 22:35 + */ +public class MonitorException extends ServiceException { + + public MonitorException(AbstractExceptionEnum exception) { + super(MonitorConstants.MONITOR_MODULE_NAME, exception); + } + +} diff --git a/kernel-o-monitor/monitor-api/src/main/java/cn/stylefeng/roses/kernel/monitor/api/exception/enums/MonitorExceptionEnum.java b/kernel-o-monitor/monitor-api/src/main/java/cn/stylefeng/roses/kernel/monitor/api/exception/enums/MonitorExceptionEnum.java new file mode 100644 index 000000000..ad84f3b43 --- /dev/null +++ b/kernel-o-monitor/monitor-api/src/main/java/cn/stylefeng/roses/kernel/monitor/api/exception/enums/MonitorExceptionEnum.java @@ -0,0 +1,37 @@ +package cn.stylefeng.roses.kernel.monitor.api.exception.enums; + +import cn.stylefeng.roses.kernel.monitor.api.constants.MonitorConstants; +import cn.stylefeng.roses.kernel.rule.abstracts.AbstractExceptionEnum; +import cn.stylefeng.roses.kernel.rule.constants.RuleConstants; +import lombok.Getter; + +/** + * 监控模块异常枚举 + * + * @author fengshuonan + * @date 2021/1/31 22:35 + */ +@Getter +public enum MonitorExceptionEnum implements AbstractExceptionEnum { + + /** + * 演示环境无法操作 + */ + DEMO_OPERATE(RuleConstants.BUSINESS_ERROR_TYPE_CODE + MonitorConstants.MONITOR_EXCEPTION_STEP_CODE + "01", "演示环境无法操作!"); + + /** + * 错误编码 + */ + private final String errorCode; + + /** + * 提示用户信息 + */ + private final String userTip; + + MonitorExceptionEnum(String errorCode, String userTip) { + this.errorCode = errorCode; + this.userTip = userTip; + } + +} diff --git a/kernel-o-monitor/monitor-business/README.md b/kernel-o-monitor/monitor-business/README.md new file mode 100644 index 000000000..cd3c01b60 --- /dev/null +++ b/kernel-o-monitor/monitor-business/README.md @@ -0,0 +1 @@ +监控模块的业务 diff --git a/kernel-o-monitor/monitor-business/pom.xml b/kernel-o-monitor/monitor-business/pom.xml new file mode 100644 index 000000000..e13334a17 --- /dev/null +++ b/kernel-o-monitor/monitor-business/pom.xml @@ -0,0 +1,29 @@ + + + 4.0.0 + + + cn.stylefeng.roses + kernel-o-monitor + 1.0.0 + ../pom.xml + + + monitor-business + + jar + + + + + + cn.stylefeng.roses + monitor-api + 1.0.0 + + + + + diff --git a/kernel-o-monitor/monitor-sdk-system-info/README.md b/kernel-o-monitor/monitor-sdk-system-info/README.md new file mode 100644 index 000000000..80c28a4b4 --- /dev/null +++ b/kernel-o-monitor/monitor-sdk-system-info/README.md @@ -0,0 +1 @@ +监控模块之系统信息监控,硬件,内存空间,磁盘容量等 diff --git a/kernel-o-monitor/monitor-sdk-system-info/pom.xml b/kernel-o-monitor/monitor-sdk-system-info/pom.xml new file mode 100644 index 000000000..966d46ddd --- /dev/null +++ b/kernel-o-monitor/monitor-sdk-system-info/pom.xml @@ -0,0 +1,29 @@ + + + 4.0.0 + + + cn.stylefeng.roses + kernel-o-monitor + 1.0.0 + ../pom.xml + + + monitor-sdk-system-info + + jar + + + + + + cn.stylefeng.roses + monitor-api + 1.0.0 + + + + + diff --git a/kernel-o-monitor/monitor-spring-boot-starter/README.md b/kernel-o-monitor/monitor-spring-boot-starter/README.md new file mode 100644 index 000000000..3f677f381 --- /dev/null +++ b/kernel-o-monitor/monitor-spring-boot-starter/README.md @@ -0,0 +1 @@ +监控模块的自动配置 diff --git a/kernel-o-monitor/monitor-spring-boot-starter/pom.xml b/kernel-o-monitor/monitor-spring-boot-starter/pom.xml new file mode 100644 index 000000000..826931bd4 --- /dev/null +++ b/kernel-o-monitor/monitor-spring-boot-starter/pom.xml @@ -0,0 +1,29 @@ + + + 4.0.0 + + + cn.stylefeng.roses + kernel-o-monitor + 1.0.0 + ../pom.xml + + + monitor-spring-boot-starter + + jar + + + + + + cn.stylefeng.roses + monitor-business + 1.0.0 + + + + + diff --git a/kernel-o-monitor/monitor-spring-boot-starter/src/main/java/cn/stylefeng/roses/kernel/monitor/starter/GunsMonitorAutoConfiguration.java b/kernel-o-monitor/monitor-spring-boot-starter/src/main/java/cn/stylefeng/roses/kernel/monitor/starter/GunsMonitorAutoConfiguration.java new file mode 100644 index 000000000..9af2078b8 --- /dev/null +++ b/kernel-o-monitor/monitor-spring-boot-starter/src/main/java/cn/stylefeng/roses/kernel/monitor/starter/GunsMonitorAutoConfiguration.java @@ -0,0 +1,15 @@ +package cn.stylefeng.roses.kernel.monitor.starter; + +import org.springframework.context.annotation.Configuration; + +/** + * 系统监控的自动配置 + * + * @author fengshuonan + * @date 2021/1/31 22:37 + */ +@Configuration +public class GunsMonitorAutoConfiguration { + + +} diff --git a/kernel-o-monitor/monitor-spring-boot-starter/src/main/resources/META-INF/spring.factories b/kernel-o-monitor/monitor-spring-boot-starter/src/main/resources/META-INF/spring.factories new file mode 100644 index 000000000..087fe22f0 --- /dev/null +++ b/kernel-o-monitor/monitor-spring-boot-starter/src/main/resources/META-INF/spring.factories @@ -0,0 +1,2 @@ +org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ + cn.stylefeng.roses.kernel.monitor.starter.GunsMonitorAutoConfiguration diff --git a/kernel-o-monitor/pom.xml b/kernel-o-monitor/pom.xml new file mode 100644 index 000000000..681edd3c3 --- /dev/null +++ b/kernel-o-monitor/pom.xml @@ -0,0 +1,36 @@ + + + 4.0.0 + + + cn.stylefeng.roses + roses-kernel + 1.0.0 + ../pom.xml + + + kernel-o-monitor + + pom + + + monitor-api + monitor-business + monitor-sdk-system-info + monitor-spring-boot-starter + + + + + + + cn.stylefeng.roses + kernel-a-rule + 1.0.0 + + + + + diff --git a/pom.xml b/pom.xml index 01a41ba3d..7d3b0edc0 100644 --- a/pom.xml +++ b/pom.xml @@ -22,26 +22,20 @@ kernel-a-rule - - kernel-d-db - kernel-d-auth + + kernel-d-cache + kernel-d-config - - kernel-d-validator + + kernel-d-db - - kernel-d-wrapper - - - kernel-d-jwt - - - kernel-d-cache + + kernel-d-ds-container kernel-d-email @@ -55,27 +49,36 @@ kernel-d-i18n - - kernel-d-sms - - - kernel-d-timer + + kernel-d-jwt kernel-d-log - - kernel-d-ds-container - - - kernel-d-scanner - kernel-d-office kernel-d-pinyin + + kernel-d-scanner + + + kernel-d-sms + + + kernel-d-timer + + + kernel-d-validator + + + kernel-d-wrapper + + + kernel-o-monitor + kernel-s-demo @@ -87,6 +90,7 @@ kernel-s-system +