From b1d79d476439beecf77789e71ab2a4981c83268e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=94=B0=E8=89=BA=E9=B9=8F?= <18382071280@163.com> Date: Mon, 19 Feb 2024 10:17:25 +0800 Subject: [PATCH] =?UTF-8?q?add(*)=20=E9=A1=B9=E7=9B=AE=E5=88=9D=E5=A7=8B?= =?UTF-8?q?=E5=8C=96=E5=88=9B=E5=BB=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 5 + pom.xml | 124 ++++++++++++++++++ .../cn/crtech/middleware/MainApplication.java | 22 ++++ .../middleware/pojo/MiddlewarePojo.java | 21 +++ src/main/resources/application-dev.yml | 21 +++ src/main/resources/application.yml | 6 + 6 files changed, 199 insertions(+) create mode 100644 .gitignore create mode 100644 pom.xml create mode 100644 src/main/java/cn/crtech/middleware/MainApplication.java create mode 100644 src/main/java/cn/crtech/middleware/pojo/MiddlewarePojo.java create mode 100644 src/main/resources/application-dev.yml create mode 100644 src/main/resources/application.yml diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..030cd72 --- /dev/null +++ b/.gitignore @@ -0,0 +1,5 @@ +/.idea/ +/log/ +/target/ +/MiddlewareMonitor.iml +/src/test/ diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000..01f0650 --- /dev/null +++ b/pom.xml @@ -0,0 +1,124 @@ + + + 4.0.0 + + cn.crtech.middleware + MiddlewareMonitor + 1.0-SNAPSHOT + + + org.springframework.boot + spring-boot-starter-parent + 2.6.2 + + + + + + org.apache.commons + commons-lang3 + + + commons-codec + commons-codec + 1.15 + + + + + org.springframework.boot + spring-boot-starter + + + org.apache.logging.log4j + log4j-to-slf4j + + + + + + + org.springframework.boot + spring-boot-starter-web + + + + + org.apache.logging.log4j + log4j-core + 2.17.1 + + + org.apache.logging.log4j + log4j-api + + + + + org.apache.logging.log4j + log4j-api + 2.17.1 + + + org.apache.logging.log4j + log4j-to-slf4j + 2.17.1 + + + org.apache.logging.log4j + log4j-api + + + + + + + org.projectlombok + lombok + true + + + + + org.springframework.boot + spring-boot-starter-data-redis + + + + + org.quartz-scheduler + quartz + 2.3.2 + + + + + dom4j + dom4j + 1.6.1 + + + + + + + + org.springframework.boot + spring-boot-maven-plugin + 2.6.2 + + true + + + + + + diff --git a/src/main/java/cn/crtech/middleware/MainApplication.java b/src/main/java/cn/crtech/middleware/MainApplication.java new file mode 100644 index 0000000..b436133 --- /dev/null +++ b/src/main/java/cn/crtech/middleware/MainApplication.java @@ -0,0 +1,22 @@ +package cn.crtech.middleware; + +import lombok.extern.slf4j.Slf4j; +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.scheduling.annotation.EnableScheduling; + +/** + * 中间件服务检测重启项目 主启动类 + * + * @author TYP + * @since 2024-02-19 10:08 + */ + +@Slf4j +@EnableScheduling +@SpringBootApplication +public class MainApplication { + public static void main(String[] args) { + SpringApplication.run(MainApplication.class, args); + } +} diff --git a/src/main/java/cn/crtech/middleware/pojo/MiddlewarePojo.java b/src/main/java/cn/crtech/middleware/pojo/MiddlewarePojo.java new file mode 100644 index 0000000..2209fae --- /dev/null +++ b/src/main/java/cn/crtech/middleware/pojo/MiddlewarePojo.java @@ -0,0 +1,21 @@ +package cn.crtech.middleware.pojo; + +import lombok.*; + +import java.io.Serializable; + +/** + * 中间件服务信息实体 + * + * @author TYP + * @since 2024-02-19 10:12 + */ + +@Data +@Builder +@ToString +@NoArgsConstructor +@AllArgsConstructor +public class MiddlewarePojo implements Serializable { + +} diff --git a/src/main/resources/application-dev.yml b/src/main/resources/application-dev.yml new file mode 100644 index 0000000..97755df --- /dev/null +++ b/src/main/resources/application-dev.yml @@ -0,0 +1,21 @@ +server: + port: 19591 + +spring: +# redis: +# database: 2 +# host: 127.0.0.1 +# port: 6379 +# password: +# timeout: 10000 +# pool: +# max-active: 8 +# max-idle: 8 +# min-idle: 0 +# max-wait: -1 + +logging: + file: + name: log/middleware_monitor.log + level: + com.crtech.applicationauth.dao: debug diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml new file mode 100644 index 0000000..4a25419 --- /dev/null +++ b/src/main/resources/application.yml @@ -0,0 +1,6 @@ +spring: + jackson: + time-zone: GMT+8 + + profiles: + active: dev