【发布时间】:2018-11-14 20:34:51
【问题描述】:
版本:
- Spring Boot 2.1.0
- Spring Boot 管理员 2.1.1
我的 Spring Boot 应用程序已向 Spring Boot Admin 报告,一切正常。只有一件不工作,那就是 JMX Bean Management。来自文档:
要在管理 UI 中与 JMX-bean 交互,您必须包含 Jolokia 在您的应用程序中。由于 Jolokia 是基于 servlet 的,因此不支持 用于反应式应用。如果您正在使用 spring-boot-admin-starter-client 它将为您拉入,如果没有 将 Jolokia 添加到您的依赖项中。
我知道它不适用于 Reactive WebFlux,但我正在使用基于 Servlet 的示例,使用 Undertow 作为我的 servlet 容器。 pom.xml中的配置:
<dependency>
<groupId>de.codecentric</groupId>
<artifactId>spring-boot-admin-starter-server</artifactId>
</dependency>
<dependency>
<groupId>de.codecentric</groupId>
<artifactId>spring-boot-admin-starter-client</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<exclusions>
<exclusion>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-undertow</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-security</artifactId>
</dependency>
正如我所说,除了一件事,那就是 JMX 控制,一切都在工作。我收到以下错误,我找不到任何原因或记录为什么?任何帮助将不胜感激!
【问题讨论】:
标签: spring-boot spring-boot-actuator spring-boot-admin