版本:
我已经用我的Spring应用程序向Spring报告了一切。只有一个部件不工作,那就是JMX管理。从医生那里:
要在管理UI中与JMX交互,您必须在应用程序中包含Jolokia。由于Jolokia是基于servlet的,所以不支持反应性应用程序。如果您使用的是spring admin-starter,那么它将为您拉入,如果不是将Jolokia添加到您的依赖项中。
我知道它不适用于反应性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控件。我得到以下错误,我找不到任何原因或日志记录的原因?任何帮助都将不胜感激!

发布于 2018-11-28 11:03:40
使用以下参数启动程序:
-Dcom.sun.management.jmxremote
-Dcom.sun.management.jmxremote.authenticate=false
-Dcom.sun.management.jmxremote.ssl=false
-Dcom.sun.management.jmxremote.local.only=false
-Dcom.sun.management.jmxremote.port=1099和(如果使用docker/kubernetes)公开端口1099
https://stackoverflow.com/questions/53308335
复制相似问题