From 0d299d9a988e8199de3332280a525abfc1efb017 Mon Sep 17 00:00:00 2001 From: zhangdaiscott <zhangdaiscott@163.com> Date: Thu, 3 Dec 2020 15:06:35 +0800 Subject: [PATCH] 解决性能监控(请求追踪、tomcat信息)菜单,打开报错的问题 --- ant-design-vue-jeecg/src/views/modules/monitor/TomcatInfo.vue | 11 ++++++----- jeecg-boot/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/config/WebMvcConfiguration.java | 9 +++++++++ 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/ant-design-vue-jeecg/src/views/modules/monitor/TomcatInfo.vue b/ant-design-vue-jeecg/src/views/modules/monitor/TomcatInfo.vue index 5885be9..0b6344f 100644 --- a/ant-design-vue-jeecg/src/views/modules/monitor/TomcatInfo.vue +++ b/ant-design-vue-jeecg/src/views/modules/monitor/TomcatInfo.vue @@ -110,14 +110,15 @@ getAction('actuator/metrics/tomcat.sessions.active.current'), getAction('actuator/metrics/tomcat.sessions.active.max'), getAction('actuator/metrics/tomcat.sessions.rejected'), - getAction('actuator/metrics/tomcat.global.sent'), - getAction('actuator/metrics/tomcat.global.request.max'), - getAction('actuator/metrics/tomcat.global.request'), + // 2.3.5.RELEASE 无此API + // getAction('actuator/metrics/tomcat.global.sent'), + // getAction('actuator/metrics/tomcat.global.request.max'), + // getAction('actuator/metrics/tomcat.global.request'), + // getAction('actuator/metrics/tomcat.threads.current'), + // getAction('actuator/metrics/tomcat.threads.config.max') // 2.1.3.RELEASE 无此API //getAction('actuator/metrics/tomcat.servlet.request'), // getAction('actuator/metrics/tomcat.servlet.request.max'), - getAction('actuator/metrics/tomcat.threads.current'), - getAction('actuator/metrics/tomcat.threads.config.max') ]).then((res) => { let tomcatInfo = [] res.forEach((value, id) => { diff --git a/jeecg-boot/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/config/WebMvcConfiguration.java b/jeecg-boot/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/config/WebMvcConfiguration.java index d57f35e..f30ba74 100644 --- a/jeecg-boot/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/config/WebMvcConfiguration.java +++ b/jeecg-boot/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/config/WebMvcConfiguration.java @@ -1,6 +1,7 @@ package org.jeecg.config; import org.springframework.beans.factory.annotation.Value; +import org.springframework.boot.actuate.trace.http.InMemoryHttpTraceRepository; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Conditional; import org.springframework.context.annotation.Configuration; @@ -63,4 +64,12 @@ public class WebMvcConfiguration implements WebMvcConfigurer { return new CorsFilter(urlBasedCorsConfigurationSource); } + /** + * SpringBootAdmin的Httptrace不见了 + * https://blog.csdn.net/u013810234/article/details/110097201 + */ + @Bean + public InMemoryHttpTraceRepository getInMemoryHttpTrace(){ + return new InMemoryHttpTraceRepository(); + } } -- libgit2 0.22.2