diff --git a/ruoyi-ui/src/views/business/monitor/service/index.vue b/ruoyi-ui/src/views/business/monitor/service/index.vue new file mode 100644 index 00000000..d13cd7b0 --- /dev/null +++ b/ruoyi-ui/src/views/business/monitor/service/index.vue @@ -0,0 +1,120 @@ + + + + diff --git a/ruoyi-visual/ruoyi-monitor/src/main/java/com/ruoyi/modules/monitor/RuoYiMonitorApplication.java b/ruoyi-visual/ruoyi-monitor/src/main/java/com/ruoyi/modules/monitor/RuoYiMonitorApplication.java index 73628b3b..956e061b 100644 --- a/ruoyi-visual/ruoyi-monitor/src/main/java/com/ruoyi/modules/monitor/RuoYiMonitorApplication.java +++ b/ruoyi-visual/ruoyi-monitor/src/main/java/com/ruoyi/modules/monitor/RuoYiMonitorApplication.java @@ -1,30 +1,30 @@ -package com.ruoyi.modules.monitor; - -import org.springframework.boot.SpringApplication; -import org.springframework.boot.autoconfigure.SpringBootApplication; -import de.codecentric.boot.admin.server.config.EnableAdminServer; - -/** - * 监控中心 - * - * @author ruoyi - */ -@EnableAdminServer -@SpringBootApplication -public class RuoYiMonitorApplication -{ - public static void main(String[] args) - { - SpringApplication.run(RuoYiMonitorApplication.class, args); - System.out.println("(♥◠‿◠)ノ゙ 监控中心启动成功 ლ(´ڡ`ლ)゙ \n" + - " .-------. ____ __ \n" + - " | _ _ \\ \\ \\ / / \n" + - " | ( ' ) | \\ _. / ' \n" + - " |(_ o _) / _( )_ .' \n" + - " | (_,_).' __ ___(_ o _)' \n" + - " | |\\ \\ | || |(_,_)' \n" + - " | | \\ `' /| `-' / \n" + - " | | \\ / \\ / \n" + - " ''-' `'-' `-..-' "); - } -} +package com.ruoyi.modules.monitor; + +import de.codecentric.boot.admin.server.config.EnableAdminServer; +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; + +/** + * 监控中心 + * + * @author ruoyi + */ +@EnableAdminServer +@SpringBootApplication +public class RuoYiMonitorApplication +{ + public static void main(String[] args) + { + SpringApplication.run(RuoYiMonitorApplication.class, args); + System.out.println("(♥◠‿◠)ノ゙ 监控中心启动成功 ლ(´ڡ`ლ)゙ \n" + + " .-------. ____ __ \n" + + " | _ _ \\ \\ \\ / / \n" + + " | ( ' ) | \\ _. / ' \n" + + " |(_ o _) / _( )_ .' \n" + + " | (_,_).' __ ___(_ o _)' \n" + + " | |\\ \\ | || |(_,_)' \n" + + " | | \\ `' /| `-' / \n" + + " | | \\ / \\ / \n" + + " ''-' `'-' `-..-' "); + } +} diff --git a/xjs-business/pom.xml b/xjs-business/pom.xml index c71c7c78..e4ec514e 100644 --- a/xjs-business/pom.xml +++ b/xjs-business/pom.xml @@ -19,6 +19,7 @@ xjs-business-english xjs-business-common xjs-business-warning + xjs-business-monitor diff --git a/xjs-business/xjs-business-common/pom.xml b/xjs-business/xjs-business-common/pom.xml index b6b245ec..92139f33 100644 --- a/xjs-business/xjs-business-common/pom.xml +++ b/xjs-business/xjs-business-common/pom.xml @@ -8,6 +8,7 @@ 3.3.0 4.0.0 + 业务模块-通用工具 xjs-business-common diff --git a/xjs-business/xjs-business-monitor/pom.xml b/xjs-business/xjs-business-monitor/pom.xml new file mode 100644 index 00000000..ec06503b --- /dev/null +++ b/xjs-business/xjs-business-monitor/pom.xml @@ -0,0 +1,44 @@ + + + + xjs-business + com.xjs + 3.3.0 + + 4.0.0 + 业务模块-业务监控模块 + + xjs-business-monitor + + + 8 + 8 + + + + + + + \ No newline at end of file diff --git a/xjs-business/xjs-business-monitor/src/main/java/com/xjs/XjsMonitorApp.java b/xjs-business/xjs-business-monitor/src/main/java/com/xjs/XjsMonitorApp.java new file mode 100644 index 00000000..bb4f52f4 --- /dev/null +++ b/xjs-business/xjs-business-monitor/src/main/java/com/xjs/XjsMonitorApp.java @@ -0,0 +1,37 @@ +package com.xjs; + +import com.baomidou.dynamic.datasource.spring.boot.autoconfigure.DynamicDataSourceAutoConfiguration; +import com.ruoyi.common.security.annotation.EnableRyFeignClients; +import com.ruoyi.common.security.config.ApplicationConfig; +import com.ruoyi.common.security.feign.FeignAutoConfiguration; +import com.ruoyi.common.swagger.annotation.EnableCustomSwagger2; +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration; +import org.springframework.context.annotation.ComponentScan; +import org.springframework.context.annotation.EnableAspectJAutoProxy; +import org.springframework.context.annotation.Import; +import org.springframework.scheduling.annotation.EnableAsync; + +/** + * @author xiejs + * @desc 业务监控服务启动器 + * @create 2022-01-02 + */ +//排除两个关于数据源的自动配置类 +@SpringBootApplication(exclude = {DynamicDataSourceAutoConfiguration.class, DataSourceAutoConfiguration.class}) +// 表示通过aop框架暴露该代理对象,AopContext能够访问 +@EnableAspectJAutoProxy(exposeProxy = true) +// 开启线程异步执行 +@EnableAsync +// 自动加载类 +@Import({ ApplicationConfig.class, FeignAutoConfiguration.class }) +//自定义bean扫描,添加xjs路径下的bean +@ComponentScan(basePackages = {"com.ruoyi","com.xjs"}) +@EnableCustomSwagger2 +@EnableRyFeignClients +public class XjsMonitorApp { + public static void main(String[] args) { + SpringApplication.run(XjsMonitorApp.class, args); + } +} diff --git a/xjs-business/xjs-business-monitor/src/main/resources/banner.txt b/xjs-business/xjs-business-monitor/src/main/resources/banner.txt new file mode 100644 index 00000000..6f3fceaa --- /dev/null +++ b/xjs-business/xjs-business-monitor/src/main/resources/banner.txt @@ -0,0 +1,8 @@ +Spring Boot Version: ${spring-boot.version} +Spring Application Name: ${spring.application.name} +____ ___ ____. _________ _____.___._____.___.________ _________ +\ \/ / | |/ _____/ \__ | |\__ | |\______ \ / _____/ + \ / | |\_____ \ ______ / | | / | | | | \ \_____ \ + / \/\__| |/ \ /_____/ \____ | \____ | | ` \/ \ +/___/\ \________/_______ / / ______| / ______|/_______ /_______ / + \_/ \/ \/ \/ \/ \/ diff --git a/xjs-business/xjs-business-monitor/src/main/resources/bootstrap.yml b/xjs-business/xjs-business-monitor/src/main/resources/bootstrap.yml new file mode 100644 index 00000000..ca3a3b38 --- /dev/null +++ b/xjs-business/xjs-business-monitor/src/main/resources/bootstrap.yml @@ -0,0 +1,29 @@ +# Tomcat +server: + port: 9903 + +# Spring +spring: + application: + # 应用名称 + name: xjs-monitor + profiles: + # 环境配置 + active: dev + cloud: + nacos: + discovery: + # 服务注册地址 + server-addr: 127.0.0.1:8848 + config: + # 配置中心地址 + server-addr: 127.0.0.1:8848 + # 配置文件格式 + file-extension: yml + # 共享配置 + shared-configs: + - application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension} + #配置组 + group: xjs + #命名空间 + namespace: xjs-666 diff --git a/xjs-business/xjs-business-monitor/src/main/resources/logback.xml b/xjs-business/xjs-business-monitor/src/main/resources/logback.xml new file mode 100644 index 00000000..03614ede --- /dev/null +++ b/xjs-business/xjs-business-monitor/src/main/resources/logback.xml @@ -0,0 +1,76 @@ + + + + + + + + + + + ${log.pattern} + + + + + + ${log.path}/info.log + + + + ${log.path}/info.%d{yyyy-MM-dd}.log + + 60 + + + ${log.pattern} + + + + INFO + + ACCEPT + + DENY + + + + + ${log.path}/error.log + + + + ${log.path}/error.%d{yyyy-MM-dd}.log + + 60 + + + ${log.pattern} + + + + ERROR + + ACCEPT + + DENY + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/xjs-business/xjs-business-monitor/src/main/resources/rebel.xml b/xjs-business/xjs-business-monitor/src/main/resources/rebel.xml new file mode 100644 index 00000000..ee3cdb5d --- /dev/null +++ b/xjs-business/xjs-business-monitor/src/main/resources/rebel.xml @@ -0,0 +1,16 @@ + + + + + + xjs-business-monitor + + + + + + + diff --git a/xjs-business/xjs-business-warning/pom.xml b/xjs-business/xjs-business-warning/pom.xml index 35e2b3fd..8e6e8acf 100644 --- a/xjs-business/xjs-business-warning/pom.xml +++ b/xjs-business/xjs-business-warning/pom.xml @@ -10,7 +10,7 @@ 4.0.0 业务模块-预警模块 - xjs-business-warining + xjs-business-warning 8