如何在 Spring Boot 应用程序中为嵌入式 tomcat 启用 jmx

1 tomcat jmx spring-boot

我正在为 springboot 应用程序使用嵌入式 tomcat,但是当我使用 jmx 通过 jconsole 获取 mbean 时,我没有看到任何 tomcat bean,后来我发现我们必须通过配置它的 conf 文件来启用 tomcat bean,但是当我使用嵌入式 tomcat 如何启用 jmx用于嵌入式 tomcat

Sim*_*lli 7

启用 tomcat MBean 注册表:

server.tomcat.mbeanregistry.enabled=true
Run Code Online (Sandbox Code Playgroud)